Fixed channel or user lock checks from conflicting

Fixed dev commands not being recognised and/or channel commands not being recognised
This commit is contained in:
benji7425 2017-01-22 20:42:26 +00:00
parent d9d4f18fa1
commit 1f37736887

View file

@ -50,9 +50,8 @@ var DiscordClient = {
intervalFunc = DiscordClient.startup; //reassign the interval function to try restart the bot every 5 sec
},
onMessage: function (user, userID, channelID, message) {
if (channelID === Config.channelID) {
//contains a link, and is not the latest link from the rss feed
if (Links.messageContainsLink(message) && (message !== Links.latestFromFeedlatestFeedLink)) {
if (channelID === Config.channelID && Links.messageContainsLink(message) && (message !== Links.latestFromFeedlatestFeedLink)) {
Log.event("Detected posted link in this message: " + message, "Discord.io");
//extract the url from the string, and cache it
@ -72,7 +71,7 @@ var DiscordClient = {
}
}
}
}
},
checkPastMessagesForLinks: function () {
var limit = 100;