diff options
Diffstat (limited to 'server/src/commands/owner/Username.ts')
| -rw-r--r-- | server/src/commands/owner/Username.ts | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/server/src/commands/owner/Username.ts b/server/src/commands/owner/Username.ts new file mode 100644 index 0000000..df6d6c4 --- /dev/null +++ b/server/src/commands/owner/Username.ts @@ -0,0 +1,35 @@ +import { Command } from 'discord-akairo'; +import { Message } from 'discord.js'; + +export default class UsernameOwner extends Command { + public constructor() { + super('username', { + aliases: ['username'], + category: 'owner', + description: { + content: 'Change the username of the bot.', + usage: '[username]', + examples: [ + 'Aki' + ] + }, + ratelimit: 3, + args: [ + { + id: 'username', + type: 'string', + prompt: { + start: 'What username would you like to give me?', + }, + match: 'rest' + } + ], + ownerOnly: true + }); + } + + public exec(msg: Message, { username }): Promise<Message> { + this.client.user.setUsername(username); + return msg.channel.send(`My username has now been set to ${username}!`) + } +}
\ No newline at end of file |