Working RSS Feeds
- Need to get worker in the background to update the sources
This commit is contained in:
20
index.js
20
index.js
@@ -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
|
||||
Reference in New Issue
Block a user