Browse Source

Merged hotfix/standard-commands-ignored into master

shorten
benji7425 4 years ago
parent
commit
44e499c9a1
  1. 6
      CHANGELOG.md
  2. 21
      feed-bot.js
  3. 2
      package.json

6
CHANGELOG.md

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

21
feed-bot.js

@ -50,17 +50,15 @@ 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)) {
Log.event("Detected posted link in this message: " + message, "Discord.io");
//extract the url from the string, and cache it
Uri.withinString(message, function (url) {
Links.cache(Links.standardise(url));
return url;
});
}
//contains a link, and is not the latest link from the rss feed
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
Uri.withinString(message, function (url) {
Links.cache(Links.standardise(url));
return url;
});
}
else {
//iterate over all of our message triggers to see if the message sent requires any action
@ -73,6 +71,7 @@ var DiscordClient = {
}
}
}
},
checkPastMessagesForLinks: function () {
var limit = 100;

2
package.json

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

Loading…
Cancel
Save