can now change the status, avatar and username of the bot

This commit is contained in:
Loïc Bersier 2018-09-07 23:57:50 +02:00
parent 02ea23caab
commit 46860291a2
3 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,23 @@
const { Command } = require('discord.js-commando');
module.exports = class BotAvatarCommand extends Command {
constructor(client) {
super(client, {
name: 'botAvatar',
group: 'owner',
memberName: 'botAvatar',
description: 'Change the avatar of the bot',
ownerOnly: true,
args: [
{
key: 'pic',
prompt: 'Wich avatar should i have?',
type: 'string',
}
]
});
}
run(message, { pic }) {
this.client.user.setAvatar(pic);
}
};

23
commands/owner/status.js Normal file
View file

@ -0,0 +1,23 @@
const { Command } = require('discord.js-commando');
module.exports = class StatusCommand extends Command {
constructor(client) {
super(client, {
name: 'status',
group: 'owner',
memberName: 'status',
description: 'Change the status of the bot',
ownerOnly: true,
args: [
{
key: 'status',
prompt: 'Wich status should i have?',
type: 'string',
}
]
});
}
run(message, { status }) {
this.client.user.setActivity(status);
}
};

View file

@ -0,0 +1,24 @@
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',
}
]
});
}
run(message, { username }) {
this.client.user.setUsername(username);
}
};