forked from Supositware/Haha-Yes
22 lines
No EOL
702 B
JavaScript
22 lines
No EOL
702 B
JavaScript
const { Command } = require('discord.js-commando');
|
|
module.exports = class AvatarCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'avatar',
|
|
group: 'general',
|
|
memberName: 'avatar',
|
|
description: 'Send the avatar of the mentionned user.',
|
|
});
|
|
}
|
|
|
|
run(message) {
|
|
if (!message.mentions.users.size) {
|
|
return message.channel.send(`Your avatar: ${message.author.displayAvatarURL}`);
|
|
}
|
|
|
|
const avatarList = message.mentions.users.map(user => {
|
|
return `${user.username}'s avatar: ${user.displayAvatarURL}`;
|
|
});
|
|
message.channel.send(avatarList);
|
|
}
|
|
}; |