2018-09-07 23:57:50 +02:00
|
|
|
const { Command } = require('discord.js-commando');
|
|
|
|
module.exports = class UsernameCommand extends Command {
|
|
|
|
constructor(client) {
|
|
|
|
super(client, {
|
|
|
|
name: 'username',
|
|
|
|
group: 'owner',
|
|
|
|
memberName: 'username',
|
|
|
|
description: 'Change the username of the bot',
|
|
|
|
ownerOnly: true,
|
|
|
|
args: [
|
|
|
|
{
|
|
|
|
key: 'username',
|
|
|
|
prompt: 'Wich status should i have?',
|
|
|
|
type: 'string',
|
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2018-09-09 21:32:08 +02:00
|
|
|
async run(message, { username }) {
|
2018-09-07 23:57:50 +02:00
|
|
|
this.client.user.setUsername(username);
|
2018-09-09 21:32:08 +02:00
|
|
|
message.say(`The username have been changed sucessfully to ${username}`);
|
2018-09-07 23:57:50 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
};
|