From 46860291a24a511ad4af87c6d731f96632b0c92c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Fri, 7 Sep 2018 23:57:50 +0200 Subject: [PATCH] can now change the status, avatar and username of the bot --- commands/owner/botAvatar.js | 23 +++++++++++++++++++++++ commands/owner/status.js | 23 +++++++++++++++++++++++ commands/owner/username.js | 24 ++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 commands/owner/botAvatar.js create mode 100644 commands/owner/status.js create mode 100644 commands/owner/username.js diff --git a/commands/owner/botAvatar.js b/commands/owner/botAvatar.js new file mode 100644 index 00000000..071041ed --- /dev/null +++ b/commands/owner/botAvatar.js @@ -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); + } +}; \ No newline at end of file diff --git a/commands/owner/status.js b/commands/owner/status.js new file mode 100644 index 00000000..d4b7ec24 --- /dev/null +++ b/commands/owner/status.js @@ -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); + } +}; \ No newline at end of file diff --git a/commands/owner/username.js b/commands/owner/username.js new file mode 100644 index 00000000..fe5f4707 --- /dev/null +++ b/commands/owner/username.js @@ -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); + + } +}; \ No newline at end of file