import { Command } from 'discord-akairo'; import { Message } from 'discord.js'; export default class OpinionFun extends Command { public constructor() { super('opinion', { aliases: ['opinion'], category: 'fun', description: { content: 'Determines the bot\'s opinion on something. WARNING: do not take these seriously.', usage: '[question]', examples: [ 'avocadoes' ] }, ratelimit: 3, args: [ { id: 'question', type: 'string', prompt: { start: 'What would you like to get an opinion on?' }, match: 'rest' } ] }); } public exec(msg: Message, { question }): Promise { const opinions = ['👍', '👎']; return msg.reply(`*${question}* ${opinions[Math.floor(Math.random() * opinions.length)]}`); } }