From 06934db8b9c48521fc0812b9e90cbd0cf113a14f Mon Sep 17 00:00:00 2001 From: Ayden Jahola Date: Fri, 6 Sep 2024 00:13:07 +0100 Subject: [PATCH] trivia: add computers category --- commands/fun/trivia.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/commands/fun/trivia.js b/commands/fun/trivia.js index 629c073..3658e69 100644 --- a/commands/fun/trivia.js +++ b/commands/fun/trivia.js @@ -21,7 +21,8 @@ module.exports = { .setRequired(true) .addChoices( { name: "Video Games", value: "15" }, - { name: "Anime & Manga", value: "31" } + { name: "Anime & Manga", value: "31" }, + { name: "Computers", value: "18" } ) ), @@ -46,7 +47,11 @@ module.exports = { try { const categoryId = interaction.options.getString("category"); const categoryName = - categoryId === "15" ? "Video Games" : "Anime & Manga"; + categoryId === "15" + ? "Video Games" + : categoryId === "31" + ? "Anime & Manga" + : "Computers"; // Fetch a trivia question from the cache or the API let triviaQuestion = await TriviaQuestion.findOne({