aniket091 / Gamecord

Discord Gamecord is a powerful npm package with a collection of minigames for your discord bot :)
https://discord-gamecord.js.org/
MIT License
101 stars 37 forks source link

[BUG] Single mode trivia always looses #14

Closed LeonTheDev-io closed 1 year ago

LeonTheDev-io commented 1 year ago

Describe the bug Single mode trivia games always tell you, you lost, even if your answer is correct

To Reproduce

  1. Create a new single mode trivia game
  2. Get a correct answer

Expected behavior It should tell you 'you won' if you won

Package versions:

retrouser955 commented 1 year ago

Hello @LeonTheDev-io! Could you provide the code you used for trivia?

LeonTheDev-io commented 1 year ago
if (game == 'trivia') {
        const Game = new Trivia({
          message: interaction,
          isSlashGame: true,
          embed: {
            title: 'Trivia',
            color: '#5865F2',
            description: 'You have 60 seconds to guess the answer.',
          },
          timeoutTime: 60000,
          buttonStyle: 'PRIMARY',
          trueButtonStyle: 'SUCCESS',
          falseButtonStyle: 'DANGER',
          mode: interaction.options.getString('mode'),
          difficulty: interaction.options.getString('difficulty'),
          winMessage: 'You won! The correct answer is {answer}.',
          loseMessage: 'You lost! The correct answer is {answer}.',
          errMessage: 'Unable to fetch question data! Please try again.',
          playerOnlyMessage: 'Only {player} can use these buttons.',
        });
        Game.startGame();
      }
aniket091 commented 1 year ago

Fixed this issue in v3.3.0 & v4.3.0, update to the lastest version. 🙂 Thanks for reporting the bug. 🐛