diff --git a/README.md b/README.md index d4cb0b24..0aac044c 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Just read `LICENSE.md`. Give credit if you use any part of this monster, thanks. 22. Start Xiao up! ## Commands -Total: 511 +Total: 512 ### Utility: diff --git a/commands/util/banner.js b/commands/util/banner.js new file mode 100644 index 00000000..18d6233e --- /dev/null +++ b/commands/util/banner.js @@ -0,0 +1,29 @@ +const Command = require('../../framework/Command'); +const { DataResolver } = require('discord.js'); + +module.exports = class BannerCommand extends Command { + constructor(client) { + super(client, { + name: 'banner', + group: 'util', + memberName: 'banner', + description: 'Sets the bot\'s banner.', + details: 'Only the bot owner(s) may use this command.', + ownerOnly: true, + guarded: true, + args: [ + { + key: 'image', + type: 'image' + } + ] + }); + } + + async run(msg, { image }) { + await this.client.rest.patch('/users/@me', { + body: { banner: await DataResolver.resolveImage(image) } + }); + return msg.say('Set the banner.'); + } +};