Gracefully handle empty clues

This commit is contained in:
lilyissillyyy
2025-09-14 00:43:18 -04:00
parent 78ba1fbd0a
commit 5070c82dfb
+3
View File
@@ -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;