Quickfix deleted channels with feeds causing reconnect loop
This commit is contained in:
parent
f1c12c8a19
commit
68680d624f
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,6 +1,6 @@
|
|||
update.sh
|
||||
guilds.json
|
||||
token.json
|
||||
token.json*
|
||||
log
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# Changelog
|
||||
|
||||
## v3.1.2
|
||||
|
||||
### Fixed
|
||||
|
||||
- Deleted channels with feeds sending the bot into a reconnect loop
|
||||
|
||||
## v3.1.1
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -11,17 +11,20 @@ module.exports = class GuildData extends Core.BaseGuildData {
|
|||
cachePastPostedLinks(guild) {
|
||||
const promises = [];
|
||||
|
||||
this.feeds.forEach(feed =>
|
||||
this.feeds.forEach(feed => {
|
||||
if (guild.channels.get(feed.channelID))
|
||||
promises.push(
|
||||
feed.updatePastPostedLinks(guild)
|
||||
.catch(err => DiscordUtil.dateError(`Error reading history in ${err.path}`))
|
||||
)
|
||||
);
|
||||
.catch(err => DiscordUtil.dateError(`Error reading history in channel ${feed.channelID}: ${err.message || err}`)));
|
||||
});
|
||||
|
||||
return Promise.all(promises);
|
||||
}
|
||||
|
||||
checkFeeds(guild) {
|
||||
this.feeds.forEach(feed => feed.fetchLatest(guild));
|
||||
this.feeds.forEach(feed => {
|
||||
if (guild.channels.get(feed.channelID))
|
||||
feed.fetchLatest(guild);
|
||||
});
|
||||
}
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "3.1.1",
|
||||
"version": "3.1.2",
|
||||
"main": "app/index.js",
|
||||
"scripts": {
|
||||
"postinstall": "cd ./discord-bot-core && npm install",
|
||||
|
|
Loading…
Reference in a new issue