Continue the jeopardy fight

This commit is contained in:
lilyissillyyy
2025-09-11 23:19:41 -04:00
parent 55534ba5f1
commit 891ec11eeb
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "155.3.0",
"version": "155.3.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {
+4
View File
@@ -10,6 +10,7 @@ module.exports = class JeopardyScrape {
this.clues = [];
this.gameIDs = [];
this.seasons = [];
this.imported = false;
}
async fetchSeasons() {
@@ -83,6 +84,7 @@ module.exports = class JeopardyScrape {
if (this.clues.includes(clue)) continue;
this.clues.push(clue);
}
this.imported = true;
return file;
}
@@ -97,8 +99,10 @@ module.exports = class JeopardyScrape {
}
async checkForUpdates() {
if (!this.imported) {
const fileExists = await checkFileExists(path.join(__dirname, '..', 'jeopardy.json'));
if (fileExists) this.importData();
}
const cluesBefore = this.clues.length;
const latestSeason = this.seasons[this.seasons.length - 1];
const seasons = await this.fetchSeasons();