diff options
Diffstat (limited to 'server/src/commands/minigames/8Ball.ts')
| -rw-r--r-- | server/src/commands/minigames/8Ball.ts | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/server/src/commands/minigames/8Ball.ts b/server/src/commands/minigames/8Ball.ts new file mode 100644 index 0000000..2ff3904 --- /dev/null +++ b/server/src/commands/minigames/8Ball.ts @@ -0,0 +1,31 @@ +import { Command } from 'discord-akairo'; +import { Message } from 'discord.js'; +import * as EightBallResponses from '../../json/8ball.json' +import { colour } from '../../Config'; + +export default class EightBallMinigames extends Command { + public constructor() { + super('8ball', { + aliases: ['8ball', '8b', '8-ball', '8-b'], + category: 'minigames', + description: { + content: 'Shake the magic 8 Ball for a fortune!', + usage: '[question]', + examples: [ + 'will I ever get married?' + ] + }, + ratelimit: 3 + }); + } + + public exec(msg: Message): Promise<Message> { + let randomResponse = EightBallResponses.standard[Math.floor(Math.random() * EightBallResponses.standard.length)]; + const embed = this.client.util.embed() + .setColor(colour) + .setAuthor('The 8-ball says', + 'https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/8-Ball_Pool.svg/500px-8-Ball_Pool.svg.png') + .setDescription(`\`${randomResponse}\``); + return msg.channel.send(embed); + } +}
\ No newline at end of file |