1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/commands/utility/avatar.js

30 lines
966 B
JavaScript

const { Command } = require('discord.js-commando');
const blacklist = require('../../json/blacklist.json')
module.exports = class AvatarCommand extends Command {
constructor(client) {
super(client, {
name: 'avatar',
group: 'utility',
memberName: 'avatar',
description: 'Send the avatar of the mentionned user.',
args: [
{
key: 'user',
prompt: 'What do you want me to say',
type: 'user',
default: ''
}
]
});
}
async run(message, { user }) {
if(blacklist[message.author.id])
return message.channel.send("You are blacklisted")
if (!user)
return message.say(`Your avatar:\n${message.author.displayAvatarURL}`);
else
return message.say(`${user.username}'s avatar:\n${user.displayAvatarURL}`);
}
};