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
729 B
JavaScript

const { Command } = require('discord-akairo');
class AvatarCommand extends Command {
constructor() {
super('avatar', {
aliases: ['avatar', 'avy'],
category: 'utility',
args: [
{
id: 'user',
type: 'user'
}
],
description: {
content: 'Show avatar of the mentioned user or you',
usage: '(optional) [@user]',
examples: ['', '@user']
}
});
}
async exec(message, args) {
if (!args.user) // While these kind of statments work you really should use {}
return message.channel.send(`Your avatar:\n${message.author.displayAvatarURL}`);
else
return message.channel.send(`${args.user.username}'s avatar:\n${args.user.displayAvatarURL}`);
}
}
module.exports = AvatarCommand;