This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Both are assuming you already have access to a channel variable | |
// Roles. You can get the ID from role.id | |
const roleId = '741229944927158315' | |
channel.send(`Hey <@&${roleId}>!`) | |
// Users. You can get the ID from member.id, user.id, etc. | |
const userId = '251120969320497152' | |
channel.send(`Hey <@${userId}>`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rememberMe = true // From your signup form | |
// Add in your own callbacks here to handle these events | |
const callback = { onSuccess: () => {}, onFailure: () => {} } | |
if (rememberMe) { | |
user.setDeviceStatusRemembered(callback) | |
} else { | |
user.setDeviceStatusNotRemembered(callback) | |
user.forgetDevice(callback) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
commands: ['deletechannel', 'delchannel', 'delc'], | |
minArgs: 1, | |
expectedArgs: '<channel name>', | |
permissionError: 'You must be an administrator to use this.', | |
permission: 'ADMINISTRATOR', | |
callback: (message, arguments, text) => { | |
const { guild } = message | |
const channel = guild.channels.cache | |
.filter((channel) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 0.2 | |
phases: | |
pre_build: | |
commands: | |
- npm install | |
build: | |
commands: | |
- npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://youtu.be/Mgs7jl430vs | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadGetObject", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scripts for https://youtu.be/FEI-uEdb2y8 | |
"deploy": "react-scripts build && aws s3 rm s3://wornoffkeys.com/ --recursive && aws s3 cp ./build s3://wornoffkeys.com/ --recursive --acl public-read" | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadGetObject", | |
"Effect": "Allow", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.youtube.com/watch?v=-qo5GFdN-Ck | |
import React, { useState } from 'react'; | |
import { CognitoUserPool } from 'amazon-cognito-identity-js'; | |
export default () => { | |
const [email, setEmail] = useState(''); | |
const [password, setPassword] = useState(''); | |
const poolData = { |