aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/events/trivianight/trivianight.py
diff options
context:
space:
mode:
authorGravatar Shom770 <[email protected]>2021-11-16 18:39:14 -0500
committerGravatar Shom770 <[email protected]>2022-02-09 18:13:37 -0500
commitc0917e9de25321f1d533568a0abe2bef8ee8c91b (patch)
tree220f411b90af9df19317d2ce6ebfb655efce9eea /bot/exts/events/trivianight/trivianight.py
parentmap percentage of people who got it correct to color (diff)
fixing rivianight reset bugs
buttons would be repeated due to a faulty reset
Diffstat (limited to 'bot/exts/events/trivianight/trivianight.py')
-rw-r--r--bot/exts/events/trivianight/trivianight.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bot/exts/events/trivianight/trivianight.py b/bot/exts/events/trivianight/trivianight.py
index 75d2c671..224b0620 100644
--- a/bot/exts/events/trivianight/trivianight.py
+++ b/bot/exts/events/trivianight/trivianight.py
@@ -94,13 +94,18 @@ class TriviaNight(commands.Cog):
async def reset(self, ctx: commands.Context) -> None:
"""Resets previous questions and scoreboards."""
self.scoreboard.view = ScoreboardView(self.bot)
- for question in self.questions.questions:
+ all_questions = self.questions.questions
+ self.questions.view = QuestionView()
+
+ for question in all_questions:
if "visited" in question.keys():
del question["visited"]
+ self.questions.questions = list(all_questions)
+
success_embed = Embed(
title=choice(POSITIVE_REPLIES),
- description="The scoreboards were reset and questions marked unvisited!",
+ description="The scoreboards were reset and questions reset!",
color=Colours.soft_green
)
await ctx.send(embed=success_embed)