Skip to content

Commit

Permalink
Don't allow previous question navigation after submission
Browse files Browse the repository at this point in the history
  • Loading branch information
Rian8337 committed May 22, 2024
1 parent 98b53e2 commit 7d71aef
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const run: ButtonCommand["run"] = async (_, interaction) => {
const questionId = parseInt(split[1]);
const attemptIndex = split[2] ? parseInt(split[2]) : undefined;

if (attemptIndex !== undefined && player.currentAttempt === undefined) {
return;
}

const question = CacheManager.anniversaryTriviaQuestions.get(questionId)!;
const language = CommandHelper.getLocale(interaction);

Expand Down

0 comments on commit 7d71aef

Please sign in to comment.