Files
Emmelia-Link-Flayer-Rewrite/controllers/rssController.js
Logan Cusano 3266a1550e Working RSS Feed Manager
- Auto updates feeds
- Sends updates to specified channels
- Needs threading
2023-02-25 20:56:01 -05:00

26 lines
729 B
JavaScript

//Will handle updating feeds in all channels
const { DebugBuilder } = require("../utilities/debugBuilder");
const log = new DebugBuilder("server", "rssController");
const libCore = require("../libCore");
const libUtils = require("../libUtils");
exports.RSSController = class RSSController {
constructor(_client) {
this.client = _client;
}
async start(){
log.INFO("Starting RSS Controller");
while(true){
await new Promise(resolve => setTimeout(resolve, 10000));
this.collectLatestPosts();
}
}
async collectLatestPosts(){
log.INFO("Updating sources");
libCore.updateFeeds(this.client)
}
}