mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Continue the jeopardy fight
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "155.3.0",
|
||||
"version": "155.3.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user