Haha-Yes/commands/thing/avatar.js

22 lines
706 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-08 03:56:48 +02:00
group: 'thing',
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-07 19:07:10 +02:00
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);
}
};