1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import { Command, CommandoMessage } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
import emoji from 'emoji-random';
module.exports = class PFPServer extends Command {
constructor(client) {
super(client, {
name: 'pfp',
aliases: ['profilepicture', 'profile-picture', 'profileimage', 'profile-image'],
group: 'server',
memberName: 'pfp',
description: 'Grabs the profile picture of a given user.',
args: [
{
key: 'userID',
prompt: 'Which user\'s profile picture would you like to grab?',
type: 'string'
}
],
examples: ['uwu!pfp @sin#1337']
});
}
run(msg: CommandoMessage, { userID } ) {
userID = msg.mentions.users.first()?.id;
this.client.users.fetch(userID).then(user => {
let emb = new MessageEmbed()
.setColor(0xFFCC4D)
.setTitle(`${msg.mentions.users.first()?.username}'s Profile Picture ` + emoji.random())
.setImage(user.avatarURL())
msg.reply(emb)
})
}
};
|