From 76819d658a42ab57ab5969908738df57d8b179db Mon Sep 17 00:00:00 2001 From: benji7425 Date: Sun, 8 Jan 2017 05:27:49 +0000 Subject: [PATCH] Fixed brackets --- feed-bot.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/feed-bot.js b/feed-bot.js index ee9f8a4..1c29b57 100644 --- a/feed-bot.js +++ b/feed-bot.js @@ -49,7 +49,7 @@ var DiscordClient = { }, onMessage: function (user, userID, channelID, message) { //check if the message is in the right channel, contains a link, and is not the latest link from the rss feed - if (channelID === Config.channelID && 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 @@ -57,8 +57,7 @@ var DiscordClient = { Links.cache(Links.standardise(url)); return url; }); - } -}, + }, checkPastMessagesForLinks: function () { var limit = 100; Log.info("Attempting to check past " + limit + " messages for links"); @@ -148,7 +147,7 @@ var Links = { Log.info("Cached URL: " + link); } - if (Links.cached.length > (Config.numLinksToCache || 10)) Links.cached.shift(); //get rid of the first array element if we have reached our cache limit + if (Links.cached.length > Config.numLinksToCache) Links.cached.shift(); //get rid of the first array element if we have reached our cache limit }, isCached: function (link) { link = Links.standardise(link);