Add pfp command
Doesn't work properly yet. Most likely because of parseMention, but I am too lazy to fix that shit right now.
This commit is contained in:
parent
2a4a021860
commit
489d365eb8
2 changed files with 19 additions and 0 deletions
18
commands/pfp.js
Normal file
18
commands/pfp.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
const parseMention = require("../util/parseMention.js")
|
||||
|
||||
module.exports = {
|
||||
name: 'pfp',
|
||||
description: 'Returns profile picture',
|
||||
execute(message, args) {
|
||||
let info;
|
||||
if (!args[0]) {
|
||||
info = message.author.id;
|
||||
} else {
|
||||
info = parseMention(args[0], message.guild);
|
||||
console.log(info)
|
||||
}
|
||||
let user = message.guild.members.cache.get(info);
|
||||
|
||||
message.channel.send(user.user.avatarURL({ format: 'png', dynamic: true, size: 2048 }))
|
||||
}
|
||||
};
|
|
@ -47,6 +47,7 @@ client.on('message', async message => {
|
|||
case "help":
|
||||
case "userinfo":
|
||||
case "katti":
|
||||
case "pfp":
|
||||
command.execute(message, args);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Reference in a new issue