From 2fc9928ab97c5b8266503e91d2d83bd735f24652 Mon Sep 17 00:00:00 2001 From: utkarshiam Date: Tue, 8 Oct 2019 05:21:48 +0530 Subject: [PATCH] The Strict Equality Comparison added --- bot/bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/bot.js b/bot/bot.js index 392a822..7e34bce 100644 --- a/bot/bot.js +++ b/bot/bot.js @@ -71,9 +71,9 @@ bot.on('error', function(error) { function checkMessageForCommand(msg, isEdit) { //check if message is a command - if (msg.author.id != bot.user.id && msg.content.startsWith(config.prefix)) { + if (msg.author.id !== bot.user.id && msg.content.startsWith(config.prefix)) { //check if user is Online - if (!msg.author.presence.status || msg.author.presence.status == 'offline' || msg.author.presence.status == 'invisible') { + if (!msg.author.presence.status || msg.author.presence.status === 'offline' || msg.author.presence.status === 'invisible') { msg.author.send('Please set your Discord Presence to Online to talk to the bot!').catch(function(error) { msg.channel .send( @@ -183,7 +183,7 @@ function checkMessageForCommand(msg, isEdit) { return; } - if (msg.author != bot.user && msg.isMentioned(bot.user)) { + if (msg.author !== bot.user && msg.isMentioned(bot.user)) { msg.channel.send('yes?'); //using a mention here can lead to looping } else { }