Now, the bot react only if the content of the message is a mention to it, without any other content. #1

Merged
KaKi87 merged 3 commits from Ionys320/voice-activity-notify-bot:master into master 2020-07-30 19:09:46 +02:00
Showing only changes of commit 692f772edd - Show all commits

View file

@ -6,6 +6,8 @@
const client = new (require('discord.js')).Client;
const clientId = client.user.id;
const lastEventDate = {};
const memberAnnoucement = {};
@ -44,7 +46,7 @@
const messageContent = message.content;
if(messageContent && messageContent == ("<@!" + client.user.id + ">")){
if(messageContent && messageContent === ('<@!' + clientId + '>')){
const { guild } = message;
@ -169,7 +171,7 @@
client.on('guildMemberUpdate', member => {
if(member.id === client.user.id)
if(member.id === clientId)
member.setNickname(null);