diff --git a/commands/owner/botAvatar.js b/commands/owner/botAvatar.js index 93ad052..f400421 100644 --- a/commands/owner/botAvatar.js +++ b/commands/owner/botAvatar.js @@ -12,13 +12,20 @@ module.exports = class BotavatarCommand extends Command { key: 'pic', prompt: 'Wich avatar should i have?', type: 'string', + default: '' } ] }); } async run(message, { pic }) { - this.client.user.setAvatar(pic); + let Attachment = (message.attachments).array(); + let image = null + if (!Attachment[0]) + return message.say('You didint provide any images') + else + image = Attachment[0].url + this.client.user.setAvatar(image); message.say('The avatar have been changed succesfully'); } }; \ No newline at end of file