From b9e9ada9d68973628266cbf4d9f01f0880629286 Mon Sep 17 00:00:00 2001 From: Jessica Chen Date: Sat, 6 Apr 2024 21:02:19 -0400 Subject: [PATCH 1/2] Allow 'bird' or 'birb' as answer for normal/flying type --- other/quiz/quiz_questions.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/other/quiz/quiz_questions.js b/other/quiz/quiz_questions.js index 1ae12c72..41ed7849 100644 --- a/other/quiz/quiz_questions.js +++ b/other/quiz/quiz_questions.js @@ -197,7 +197,11 @@ const pokemonType = () => new Promise(resolve => { (async () => { const pokemon = getRandomPokemon(); const types = pokemon.type.map(t => PokemonType[t]); - const answer = new RegExp(`^\\W*(${types.join('\\W*')}|${types.reverse().join('\\W*')})\\b`, 'i'); + let memeAnswer = null; + if (types.includes('Flying') && types.includes('Normal')) { + memeAnswer = 'bir[bd]'; + } + const answer = new RegExp(`^\\W*(${types.join('\\W*')}|${types.reverse().join('\\W*')}${memeAnswer && `|${memeAnswer}`})\\b`, 'i'); let amount = getAmount(); From 07e2d630128c0cef7fa16b1ded1737f02a806eeb Mon Sep 17 00:00:00 2001 From: Jessica Chen Date: Sun, 7 Apr 2024 00:23:22 -0400 Subject: [PATCH 2/2] Update other/quiz/quiz_questions.js Co-authored-by: Danial --- other/quiz/quiz_questions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/quiz/quiz_questions.js b/other/quiz/quiz_questions.js index 41ed7849..fa3b68f3 100644 --- a/other/quiz/quiz_questions.js +++ b/other/quiz/quiz_questions.js @@ -197,7 +197,7 @@ const pokemonType = () => new Promise(resolve => { (async () => { const pokemon = getRandomPokemon(); const types = pokemon.type.map(t => PokemonType[t]); - let memeAnswer = null; + let memeAnswer = ''; if (types.includes('Flying') && types.includes('Normal')) { memeAnswer = 'bir[bd]'; }