1
0
Fork 0

made it shorter

Commando
loicbersier 6 years ago
parent 8d271be6a3
commit 841b70f2b2

@ -6,16 +6,23 @@ module.exports = class AvatarCommand extends Command {
group: 'utility', group: 'utility',
memberName: 'avatar', memberName: 'avatar',
description: 'Send the avatar of the mentionned user.', description: 'Send the avatar of the mentionned user.',
memberName: 'say',
description: `Repeat the text you send`,
args: [
{
key: 'user',
prompt: 'What do you want me to say',
type: 'user',
default: ''
}
]
}); });
} }
async run(message) { async run(message, { user }) {
if (!message.mentions.users.size) if (!user)
return message.channel.send(`Your avatar: ${message.author.displayAvatarURL}`); return message.say(`Your avatar:\n${message.author.displayAvatarURL}`);
else
const avatarList = message.mentions.users.map(user => { return message.say(`${user.username}'s avatar:\n${user.displayAvatarURL}`);
return `${user.username}'s avatar: ${user.displayAvatarURL}`;
});
message.channel.send(avatarList);
} }
}; };
Loading…
Cancel
Save