aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RohanJnr <[email protected]>2019-09-11 22:28:27 +0530
committerGravatar RohanJnr <[email protected]>2019-09-11 22:28:27 +0530
commit1d36074e7c2dd1b6e9acc52dfda96a728345f740 (patch)
tree2797858b6333f24349a43bcedd74e7f217abbbd8
parentMade the following changes: (diff)
using self.categories insted of list(self.categories.keys())
Pending work: - Function annotation - Announcement of multiple winners (if they have same points).
-rw-r--r--bot/seasons/evergreen/trivia_quiz.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/seasons/evergreen/trivia_quiz.py b/bot/seasons/evergreen/trivia_quiz.py
index dd4008d0..433a021d 100644
--- a/bot/seasons/evergreen/trivia_quiz.py
+++ b/bot/seasons/evergreen/trivia_quiz.py
@@ -79,11 +79,11 @@ class TriviaQuiz(commands.Cog):
return await ctx.send("Game already running in this channel!")
if category is None:
- category = random.choice(list(self.categories.keys()))
+ category = random.choice(self.categories)
else:
category = category.lower()
- if category not in self.categories.keys():
+ if category not in self.categories:
embed = self.category_embed()
return await ctx.send(f"Category {category} does not exist!", embed=embed)