diff options
Diffstat (limited to 'src/commands/server/pfp.ts')
| -rw-r--r-- | src/commands/server/pfp.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/commands/server/pfp.ts b/src/commands/server/pfp.ts new file mode 100644 index 0000000..6d7ce73 --- /dev/null +++ b/src/commands/server/pfp.ts @@ -0,0 +1,27 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; + +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 => { + msg.reply({ files: [user.avatarURL()] }) + }) + } +};
\ No newline at end of file |