diff options
-rw-r--r-- | bot/exts/events/trivianight/trivianight.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bot/exts/events/trivianight/trivianight.py b/bot/exts/events/trivianight/trivianight.py index a86bd73f..1fffe9fe 100644 --- a/bot/exts/events/trivianight/trivianight.py +++ b/bot/exts/events/trivianight/trivianight.py @@ -254,6 +254,15 @@ class TriviaNight(commands.Cog): The scoreboard view also has a button where the user can see their own rank, points and average speed if they didn't make it onto the leaderboard. """ + if self.questions.view.active_question is True: + error_embed = Embed( + title=choice(NEGATIVE_REPLIES), + description="You can't end the event while a question is ongoing!", + color=Colours.soft_red + ) + await ctx.send(embed=error_embed) + return + scoreboard_embed, scoreboard_view = await self.scoreboard.display() await ctx.send(embed=scoreboard_embed, view=scoreboard_view) |