summaryrefslogtreecommitdiff
path: root/server/src/commands/fun/Rate.ts
blob: d377c11070ff977d9e3a332c5ec6ab03bee98a4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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<Message> {
        return msg.reply(`I'd give *${item}* a rating of **${Math.floor(Math.random() * 10) + 1}/ 10**!`);
    }
}