fixed ambiguousness

This commit is contained in:
2019-06-11 03:17:46 +10:00
parent 965f75595b
commit 0949ab7469
2 changed files with 3 additions and 2 deletions

View File

@@ -6,8 +6,8 @@ module.exports = {
permissions: ['READ_MESSAGES'],
category: 'general',
command: (client, msg) => {
if (msg.mentions.members.array().length > 0)
msg.channel.send(msg.mentions.members.first() + ', ' + getInsult());
if (msg.mentions.members.filter(member => { member.id != client.user.id }).array().length > 0)
msg.channel.send(msg.mentions.members.filter(member => { member.id != client.user.id }).first() + ', ' + getInsult());
else
msg.reply(getInsult());
}