Merged hotfix/standard-commands-ignored into master

This commit is contained in:
benji7425 2017-01-22 20:43:29 +00:00
commit 44e499c9a1
3 changed files with 16 additions and 11 deletions

View file

@ -1,5 +1,11 @@
# Changelog # Changelog
## v1.3.2
### Fixed
- Fixed list posting channel messages being ignored
## v1.3.1 ## v1.3.1
### Fixed ### Fixed

View file

@ -50,17 +50,15 @@ var DiscordClient = {
intervalFunc = DiscordClient.startup; //reassign the interval function to try restart the bot every 5 sec intervalFunc = DiscordClient.startup; //reassign the interval function to try restart the bot every 5 sec
}, },
onMessage: function (user, userID, channelID, message) { onMessage: function (user, userID, channelID, message) {
if (channelID === Config.channelID) { //contains a link, and is not the latest link from the rss feed
//contains a link, and is not the latest link from the rss feed if (channelID === Config.channelID && Links.messageContainsLink(message) && (message !== Links.latestFromFeedlatestFeedLink)) {
if (Links.messageContainsLink(message) && (message !== Links.latestFromFeedlatestFeedLink)) { Log.event("Detected posted link in this message: " + message, "Discord.io");
Log.event("Detected posted link in this message: " + message, "Discord.io");
//extract the url from the string, and cache it //extract the url from the string, and cache it
Uri.withinString(message, function (url) { Uri.withinString(message, function (url) {
Links.cache(Links.standardise(url)); Links.cache(Links.standardise(url));
return url; return url;
}); });
}
} }
else { else {
//iterate over all of our message triggers to see if the message sent requires any action //iterate over all of our message triggers to see if the message sent requires any action
@ -73,6 +71,7 @@ var DiscordClient = {
} }
} }
} }
}, },
checkPastMessagesForLinks: function () { checkPastMessagesForLinks: function () {
var limit = 100; var limit = 100;

View file

@ -1,6 +1,6 @@
{ {
"name": "discord-feed-bot", "name": "discord-feed-bot",
"version": "1.3.1", "version": "1.3.2",
"description": "discord-feed-bot", "description": "discord-feed-bot",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {