From ef0401425fcd7623013c3f5375e2ec3a8954179a Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 18 May 2021 21:51:42 -0400 Subject: [PATCH] Fix jeopardy with no category --- commands/games-sp/jeopardy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/games-sp/jeopardy.js b/commands/games-sp/jeopardy.js index 9130fdc8..ab5ed5d6 100644 --- a/commands/games-sp/jeopardy.js +++ b/commands/games-sp/jeopardy.js @@ -54,7 +54,8 @@ module.exports = class JeopardyCommand extends Command { dispatcher.once('error', () => this.client.dispatchers.delete(msg.guild.id)); await reactIfAble(msg, this.client.user, '🔉'); } - await msg.reply(`The category is: **${question.category.title.toUpperCase()}**. 30 seconds, good luck.`, { + const category = question.category ? question.category.title.toUpperCase() : ''; + await msg.reply(`${category ? `The category is: **${category}**. ` : ''}30 seconds, good luck.`, { files: [{ attachment: clueCard, name: 'clue-card.png' }] }); const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {