Merged hotfix/standard-commands-ignored into master
This commit is contained in:
commit
44e499c9a1
|
@ -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
|
||||||
|
|
19
feed-bot.js
19
feed-bot.js
|
@ -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;
|
||||||
|
|
|
@ -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": {
|
||||||
|
|
Loading…
Reference in a new issue