diff --git a/commands/pfp.js b/commands/pfp.js index 23d2936..046c153 100644 --- a/commands/pfp.js +++ b/commands/pfp.js @@ -2,9 +2,7 @@ module.exports = { name: 'pfp', description: 'get user pfp', execute(message) { - if (!message.mentions.users.size) { - return message.channel.send(`Your avatar: ${message.author.displayAvatarURL}`); - } + if (!message.mentions) return message.channel.send(`Your avatar: ${message.author.displayAvatarURL}`); const pfp = message.mentions.users.map(user => { return `${user.username}'s avatar: ${user.displayAvatarURL}`; @@ -12,4 +10,4 @@ module.exports = { message.channel.send(pfp); }, -}; \ No newline at end of file +};