summaryrefslogtreecommitdiff
path: root/server/src/commands/owner/Status.ts
blob: 8bf8dadff8f0782e60f289f1210d8a7b5a7e9982 (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
34
35
import { Command } from 'discord-akairo';
import { Message } from 'discord.js';

export default class StatusOwner extends Command {
    public constructor() {
        super('status', {
            aliases: ['status'],
            category: 'owner',
            description: {
                content: 'Change the status of the bot.',
                usage: '[status message]',
                examples: [
                    'hello, world!'
                ]
            },
            ratelimit: 3,
            args: [
                {
                    id: 'status',
                    type: 'string',
                    prompt: {
                        start: 'Which status would you like to give me?',
                    },
                    match: 'rest'
                }
            ],
            ownerOnly: true
        });
    }
    
    public exec(msg: Message, { status }): Promise<Message> {
        this.client.user.setActivity(status);
        return msg.channel.send(`My status has not been set to ${status}!`);
    }
}