Fixed detection of links in all channels

This commit is contained in:
benji7425 2017-01-08 06:44:08 +00:00
parent 6cab2ebab8
commit 218d2ec40f
1 changed files with 8 additions and 7 deletions

View File

@ -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,6 +57,7 @@ var DiscordClient = {
Links.cache(Links.standardise(url));
return url;
});
}
},
checkPastMessagesForLinks: function () {
var limit = 100;