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

const { Command } = require('discord-akairo');
6 years ago
class AvatarCommand extends Command {
6 years ago
constructor() {
super('avatar', {
aliases: ['avatar', 'avy'],
category: 'utility',
args: [
{
id: 'user',
type: 'user'
6 years ago
}
],
description: {
content: 'Show avatar of the mentioned user or you',
usage: '(optional) [@user]',
examples: ['', '@user', 'username']
}
6 years ago
});
}
6 years ago
6 years ago
async exec(message, args) {
if (!args.user)
5 years ago
return message.channel.send('Your avatar:', {files: [message.author.displayAvatarURL() + '?size=2048']});
6 years ago
else
5 years ago
return message.channel.send(`${args.user.username}'s avatar:`, {files: [args.user.displayAvatarURL() + '?size=2048']});
6 years ago
}
}
module.exports = AvatarCommand;