import { Command } from 'discord-akairo'; import { Message } from 'discord.js'; export default class RateFun extends Command { public constructor() { super('rate', { aliases: ['rate'], category: 'fun', description: { content: 'Determines the bot\'s rating on something. WARNING: do not take these seriously.', usage: '[question/ item/ topic]', examples: [ 'avocadoes' ] }, ratelimit: 3, args: [ { id: 'item', type: 'string', prompt: { start: 'What would you like to get a rating on?' }, match: 'rest' } ] }); } public exec(msg: Message, { item }): Promise { return msg.reply(`I'd give *${item}* a rating of **${Math.floor(Math.random() * 10) + 1}/ 10**!`); } }