fixed the command, i think
This commit is contained in:
parent
857fde935a
commit
666477a152
1 changed files with 5 additions and 1 deletions
|
@ -10,7 +10,6 @@ class BotAvatarCommand extends Command {
|
|||
{
|
||||
id: 'image',
|
||||
type:'string',
|
||||
optional: true,
|
||||
match: 'rest'
|
||||
}
|
||||
],
|
||||
|
@ -27,6 +26,11 @@ class BotAvatarCommand extends Command {
|
|||
let image = args.image;
|
||||
if (!Attachment[0] && !image)
|
||||
return message.say('You didint provide any images');
|
||||
else if (image && !Attachment[0]) {
|
||||
this.client.user.setAvatar(image)
|
||||
.catch(() => message.channel.send('The link you provided dosen\'t work... is it a picture?'));
|
||||
return message.channel.send('The avatar have been changed succesfully');
|
||||
}
|
||||
else
|
||||
image = Attachment[0].url;
|
||||
|
||||
|
|
Loading…
Reference in a new issue