Working RSS Feeds

- Need to get worker in the background to update the sources
This commit is contained in:
Logan Cusano
2023-02-25 19:51:49 -05:00
parent ae071be8b8
commit d33f1ceccc
9 changed files with 218 additions and 250 deletions

View File

@@ -91,12 +91,7 @@ function runHTTPServer() {
server.on('error', libUtils.onError);
server.on('listening', () => {
log.INFO("HTTP server started!");
try {
libCore.feedArray = libCore.getFeeds();
} catch (error) {
log.ERROR(error);
}
log.INFO("HTTP server started!");
})
}
@@ -123,10 +118,13 @@ client.on('ready', () => {
// Deploy slash commands
log.DEBUG("Deploying slash commands");
deployCommands.deploy(client.guilds.cache.map(guild => guild.id));
deployCommands.deploy(client.guilds.cache.map(guild => guild.id));
log.DEBUG(`Starting HTTP Server`);
runHTTPServer();
log.DEBUG("Loading new posts");
libCore.updateFeeds(client);
});
// Setup any additional event handlers
@@ -143,10 +141,4 @@ for (const file of eventFiles) {
}
}
client.login(discordToken); //Load Client Discord Token
try {
log.INFO("Loading initial startup feeds");
libCore.loadFeeds();
} catch (error) {
log.ERROR(error);
}
client.login(discordToken); //Load Client Discord Token