diff options
Diffstat (limited to 'src/commands/emma/verify.ts')
| -rw-r--r-- | src/commands/emma/verify.ts | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/commands/emma/verify.ts b/src/commands/emma/verify.ts deleted file mode 100644 index 6f4584a..0000000 --- a/src/commands/emma/verify.ts +++ /dev/null @@ -1,54 +0,0 @@ -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 |