From 1d36074e7c2dd1b6e9acc52dfda96a728345f740 Mon Sep 17 00:00:00 2001 From: RohanJnr Date: Wed, 11 Sep 2019 22:28:27 +0530 Subject: using self.categories insted of list(self.categories.keys()) Pending work: - Function annotation - Announcement of multiple winners (if they have same points). --- bot/seasons/evergreen/trivia_quiz.py | 4 ++-- 1 file 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) -- cgit v1.2.3