Now, the bot react only if the content of the message is a mention to it, without any other content. #1
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
|
@ -42,9 +42,9 @@
|
|||
|
||||
const memberId = messageAuthorMember.id;
|
||||
|
||||
const messageMentionsMembers = message.mentions.members;
|
||||
const messageContent = message.content;
|
||||
|
||||
if(messageMentionsMembers && messageMentionsMembers.has(client.user.id)){
|
||||
if(messageContent && messageContent == ("<@!" + client.user.id + ">")){
|
||||
|
||||
const { guild } = message;
|
||||
|
||||
|
|
|
|||
Reference in a new issue