Haha-Yes/commands/utility/avatar.js

21 lines
696 B
JavaScript
Raw Normal View History

2018-09-07 19:07:10 +02:00
const { Command } = require('discord.js-commando');
module.exports = class AvatarCommand extends Command {
constructor(client) {
super(client, {
name: 'avatar',
2018-09-16 21:02:11 +02:00
group: 'utility',
2018-09-07 19:07:10 +02:00
memberName: 'avatar',
description: 'Send the avatar of the mentionned user.',
});
}
2018-09-09 21:32:08 +02:00
async run(message) {
2018-09-28 16:16:35 +02:00
if (!message.mentions.users.size)
2018-09-07 19:07:10 +02:00
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);
}
};