From 5070c82dfbe01dfe1341d7d4b25de6d6340db7e1 Mon Sep 17 00:00:00 2001 From: lilyissillyyy Date: Sun, 14 Sep 2025 00:43:18 -0400 Subject: [PATCH] Gracefully handle empty clues --- commands/games-sp/jeopardy.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/games-sp/jeopardy.js b/commands/games-sp/jeopardy.js index 47c4d398..9d28e949 100644 --- a/commands/games-sp/jeopardy.js +++ b/commands/games-sp/jeopardy.js @@ -43,6 +43,9 @@ module.exports = class JeopardyCommand extends Command { } async run(msg) { + if (!this.client.jeopardy.clues.length) { + return msg.reply('Hang tight! I\'m updating my clue database.'); + } const question = this.client.jeopardy.clues[Math.floor(Math.random() * this.client.jeopardy.clues.length)]; const clueCard = await this.generateClueCard(question.question); const connection = msg.guild ? this.client.dispatchers.get(msg.guild.id) : null;