mirror of
https://github.com/litruv/DAdmin.git
synced 2026-07-25 03:06:11 +10:00
fixed ambiguousness
This commit is contained in:
@@ -6,8 +6,8 @@ module.exports = {
|
|||||||
permissions: ['READ_MESSAGES'],
|
permissions: ['READ_MESSAGES'],
|
||||||
category: 'general',
|
category: 'general',
|
||||||
command: (client, msg) => {
|
command: (client, msg) => {
|
||||||
if (msg.mentions.members.array().length > 0)
|
if (msg.mentions.members.filter(member => { member.id != client.user.id }).array().length > 0)
|
||||||
msg.channel.send(msg.mentions.members.first() + ', ' + getInsult());
|
msg.channel.send(msg.mentions.members.filter(member => { member.id != client.user.id }).first() + ', ' + getInsult());
|
||||||
else
|
else
|
||||||
msg.reply(getInsult());
|
msg.reply(getInsult());
|
||||||
}
|
}
|
||||||
|
|||||||
1
index.js
1
index.js
@@ -163,6 +163,7 @@ function doCommand(msg, prefix) {
|
|||||||
else {
|
else {
|
||||||
var command = message.replace("@" + msg.guild.me.displayName, "").trim().split(" ", 1)[0];
|
var command = message.replace("@" + msg.guild.me.displayName, "").trim().split(" ", 1)[0];
|
||||||
msg.suffix = message.replace("@" + msg.guild.me.displayName, "").replace(command, "").trim()
|
msg.suffix = message.replace("@" + msg.guild.me.displayName, "").replace(command, "").trim()
|
||||||
|
//msg.mentions.users = msg.mentions.users.filter(mention => mention.id != client.user.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user