diff options
| author | 8cy <[email protected]> | 2020-07-07 03:55:21 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-07 03:55:21 -0700 |
| commit | 385b0960abdc8bb13172330a973dafd56560cf8d (patch) | |
| tree | 86e85d23404a5170ffbf870a6faeba77b3430e0e /src/commands/emma | |
| parent | add fanart for emma :star2: (diff) | |
| download | dep-core-385b0960abdc8bb13172330a973dafd56560cf8d.tar.xz dep-core-385b0960abdc8bb13172330a973dafd56560cf8d.zip | |
big cool :star:
- add commenting to bot.ts
- add types to most of the voice commands
- add art and verify cmd for emma
- add roastwilly cmd
- fix rp cmd formatting
Diffstat (limited to 'src/commands/emma')
| -rw-r--r-- | src/commands/emma/art.ts | 2 | ||||
| -rw-r--r-- | src/commands/emma/verify.ts | 54 |
2 files changed, 56 insertions, 0 deletions
diff --git a/src/commands/emma/art.ts b/src/commands/emma/art.ts index ee8c451..9465fb2 100644 --- a/src/commands/emma/art.ts +++ b/src/commands/emma/art.ts @@ -193,6 +193,8 @@ module.exports = class ArtEmma extends Command { }) } }) + } else if (type == 'admin-test') { + return msg.reply('**ADMIN INFO:** Art channel bound.') } /* else { diff --git a/src/commands/emma/verify.ts b/src/commands/emma/verify.ts new file mode 100644 index 0000000..6f4584a --- /dev/null +++ b/src/commands/emma/verify.ts @@ -0,0 +1,54 @@ +import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; +//@ts-ignore +import emoji from 'emoji-random'; +import Verify from '../../models/Verify'; +import mongo from 'mongoose'; +import config from '../../config.json'; +mongo.connect(config['mongodburi'], { useNewUrlParser: true, useUnifiedTopology: true }) + +module.exports = class VerifyEmma extends Command { + constructor(client: CommandoClient) { + super(client, { + name: 'verify', + group: 'emma', + memberName: 'verify', + description: 'Lists all the roles on the current server.', + examples: ['uwu!verify set', 'uwu!verify remove'], + throttling: { + usages: 5, + duration: 30 + }, + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + guildOnly: true, + args: [ + { + key: 'code', + prompt: 'What is the verification code?', + type: 'string' + } + ] + }); + } + //@ts-ignore this ok + async run(msg: CommandoMessage, { code }: any) { + if (msg.guild.id == '704032355987488791') return msg.reply(`You are not submitting from **Kat\'s Korner**! ${emoji.random()}`); + Verify.findOne({ userID: msg.author.id }, async (error, member) => { + if (error) return console.error(error) + //@ts-ignore this exists + if (msg.author.id == member.userID) { + //@ts-ignore this in-fact + if (code == member.key) { + await Verify.findOneAndDelete({ userID: msg.author.id }); + const unverRole = '729928740359897101'; + return msg.guild.member(msg.author.id)?.roles.remove(unverRole); + } else { + //@ts-ignore this exists + return msg.author.send(`That is not the correct key! Please try again with the correct key: \`${member.key}\`. ${emoji.random()}`); + } + } else { + return msg.author.send(`You are already verified! ${emoji.random()}`) + } + }) + } +};
\ No newline at end of file |