2018-09-07 19:07:10 +02:00
|
|
|
const { Command } = require('discord.js-commando');
|
2018-10-15 20:23:45 +02:00
|
|
|
const blacklist = require('../../json/blacklist.json')
|
|
|
|
|
2018-09-07 19:07:10 +02:00
|
|
|
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-10-13 15:36:01 +02:00
|
|
|
memberName: 'say',
|
|
|
|
description: `Repeat the text you send`,
|
|
|
|
args: [
|
|
|
|
{
|
|
|
|
key: 'user',
|
|
|
|
prompt: 'What do you want me to say',
|
|
|
|
type: 'user',
|
|
|
|
default: ''
|
|
|
|
}
|
|
|
|
]
|
2018-09-07 19:07:10 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2018-10-13 15:36:01 +02:00
|
|
|
async run(message, { user }) {
|
2018-10-15 20:23:45 +02:00
|
|
|
if(blacklist[message.author.id])
|
|
|
|
return message.channel.send("You are blacklisted")
|
2018-10-13 15:36:01 +02:00
|
|
|
if (!user)
|
|
|
|
return message.say(`Your avatar:\n${message.author.displayAvatarURL}`);
|
|
|
|
else
|
|
|
|
return message.say(`${user.username}'s avatar:\n${user.displayAvatarURL}`);
|
2018-09-07 19:07:10 +02:00
|
|
|
}
|
|
|
|
};
|