Attach image instead of sending link

This commit is contained in:
loicbersier 2019-02-13 15:47:46 +01:00
parent e1c0cbcdd3
commit 055035f01d

View file

@ -21,9 +21,9 @@ class AvatarCommand extends Command {
async exec(message, args) {
if (!args.user)
return message.channel.send(`Your avatar:\n${message.author.displayAvatarURL()}`);
return message.channel.send('Your avatar:', {files: [message.author.displayAvatarURL('png', '2048')]});
else
return message.channel.send(`${args.user.username}'s avatar:\n${args.user.displayAvatarURL()}`);
return message.channel.send(`${args.user.username}'s avatar:`, {files: [args.user.displayAvatarURL('png', '2048')]});
}
}