diff options
| author | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
| commit | bb511abc03bb66848947e37a999502b813c77269 (patch) | |
| tree | 612c010fc8317e1cdf11471a18aad0270819d33e /src/commands/server/poll.ts | |
| parent | fix: if clear amount equal or over 100, round down to 99 (diff) | |
| download | dep-core-bb511abc03bb66848947e37a999502b813c77269.tar.xz dep-core-bb511abc03bb66848947e37a999502b813c77269.zip | |
goodbye old uwufier :cry:
Diffstat (limited to 'src/commands/server/poll.ts')
| -rw-r--r-- | src/commands/server/poll.ts | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/commands/server/poll.ts b/src/commands/server/poll.ts deleted file mode 100644 index 8eafcb9..0000000 --- a/src/commands/server/poll.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -import { MessageEmbed } from 'discord.js'; -//@ts-ignore no types -import emoji from 'emoji-random' -import config from '../../config.json' - -module.exports = class PollServer extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'poll', - group: 'server', - memberName: 'poll', - description: 'Make a poll.', - examples: ['uwu!poll am i cool?'], - throttling: { - usages: 5, - duration: 30 - }, - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - guildOnly: true - }); - } - //@ts-ignore this is not async - run(msg: CommandoMessage) { - if (config['validUsers'].includes(msg.author.id)) { - let messageArray = msg.content.split(' ') - let args = messageArray.slice(1) - - if (!args || args.length < 1) { - return msg.reply(`No poll content was specified. ${emoji.random()}`) - } else { - let emb = new MessageEmbed() - .setColor(0xFFCC4D) - .setFooter('React to vote.') - .setDescription(args.join(' ')) - .setTitle(`Poll Created by ${msg.author.username} ${emoji.random()}`) - return msg.say(emb).then(fMsg => { - //@ts-ignore yes these exist - fMsg.react('✅') - //@ts-ignore yes these exist - fMsg.react('❎') - //@ts-ignore yes these exist - msg.delete({ timeout: 1000 }) - }) - } - } else { - msg.delete() - //@ts-ignore - return msg.reply(`Insufficent permissions! ${emoji.random()}`).then(m => m.delete({ timeout: 3000 })) - } - } -};
\ No newline at end of file |