Fix Final Jeopardy not scraping

This commit is contained in:
lilyissillyyy
2025-08-22 21:53:15 -04:00
parent 0a4f259554
commit 4d2c1c29b1
3 changed files with 17 additions and 11 deletions
+14 -8
View File
@@ -304,14 +304,6 @@ client.on('ready', async () => {
client.logger.error(`[STYLIZE] Failed to load stylize models\n${err.stack}`);
}
// Update Jeopardy questions
try {
const newClues = await client.jeopardy.checkForUpdates();
client.logger.info(`[JEOPARDY] Added ${newClues} new Jeopardy clues.`);
} catch (err) {
client.logger.error(`[JEOPARDY] Failed to update Jeopardy clues\n${err.stack}`);
}
// Fetch all members
try {
for (const guild of client.guilds.cache.values()) {
@@ -321,6 +313,20 @@ client.on('ready', async () => {
} catch (err) {
client.logger.error(`[MEMBERS] Failed to fetch guild members\n${err.stack}`);
}
// Update Jeopardy questions
try {
client.logger.info('[JEOPARDY] Starting Jeopardy clue update...');
const newClues = await client.jeopardy.checkForUpdates();
client.logger.info(`[JEOPARDY] Added ${newClues} new Jeopardy clues.`);
setInterval(() => {
client.jeopardy.checkForUpdates()
.then(count => client.logger.info(`[JEOPARDY] Added ${count} new Jeopardy clues.`))
.catch(err => client.logger.error(`[JEOPARDY] Failed to update Jeopardy clues\n${err.stack}`));
}, 8.64e+7);
} catch (err) {
client.logger.error(`[JEOPARDY] Failed to update Jeopardy clues\n${err.stack}`);
}
});
client.on('messageCreate', async msg => {