summaryrefslogtreecommitdiff
path: root/src/commands/user/nickname.ts
blob: ffc8d181c140269efd859d60def1efecbca92c2a (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
import { Command, CommandoMessage } from 'discord.js-commando';
import emoji from 'emoji-random';

module.exports = class NickNameUser extends Command {
    constructor(client) {
        super(client, {
            name: 'nickname',
            aliases: ['nick', 'name'],
            group: 'user',
            memberName: 'nickname',
            description: 'Allows you to change your nickname in the current server.',
            args: [
                {
                    key: 'userNick',
                    prompt: 'What would you like to change your nickname to?',
                    type: 'string'
                }
            ],
            examples: [
                'uwu!nickname sinny',
                'uwu!nick s1nical',
                'uwu!name s1n'
            ]
        });
    }
    run(msg: CommandoMessage, { userNick }) {
        msg.member.setNickname(userNick)
        msg.reply(`Your nickname has been changed to ${userNick}. ` + emoji.random())
    }
};