Fix error on jeopardy clue export

This commit is contained in:
lilyissillyyy
2025-12-23 21:02:47 -05:00
parent 3399e553a6
commit 7d6f7db9ad
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "xiao", "name": "xiao",
"version": "159.3.1", "version": "159.3.2",
"description": "Your personal server companion.", "description": "Your personal server companion.",
"main": "Xiao.js", "main": "Xiao.js",
"scripts": { "scripts": {
+2 -2
View File
@@ -1,7 +1,7 @@
const request = require('node-superfetch'); const request = require('node-superfetch');
const cheerio = require('cheerio'); const cheerio = require('cheerio');
const fs = require('fs'); const fs = require('fs');
const { JSON } = require('everything-json'); const { JSON: eJSON } = require('everything-json');
const path = require('path'); const path = require('path');
const { checkFileExists } = require('../util/Util'); const { checkFileExists } = require('../util/Util');
const rounds = ['jeopardy_round', 'double_jeopardy_round', 'final_jeopardy_round']; const rounds = ['jeopardy_round', 'double_jeopardy_round', 'final_jeopardy_round'];
@@ -67,7 +67,7 @@ module.exports = class JeopardyScrape {
async importData() { async importData() {
const read = await fs.promises.readFile(path.join(__dirname, '..', 'jeopardy.json'), { encoding: 'utf8' }); const read = await fs.promises.readFile(path.join(__dirname, '..', 'jeopardy.json'), { encoding: 'utf8' });
const file = await JSON.parseAsync(read); const file = await eJSON.parseAsync(read);
if (typeof file !== 'object' || Array.isArray(file)) return null; if (typeof file !== 'object' || Array.isArray(file)) return null;
if (!file.clues || !file.gameIDs || !file.seasons) return null; if (!file.clues || !file.gameIDs || !file.seasons) return null;
this.imported = true; this.imported = true;