diff options
| author | 2019-10-20 08:39:10 +0530 | |
|---|---|---|
| committer | 2019-10-20 08:39:10 +0530 | |
| commit | d24bc073b32887a060eb1f9f17b9e2076984859a (patch) | |
| tree | 34afb6ea92c32ea9d8581f97ec7f5eaf5d3c5afe | |
| parent | added a cool down per channel to the quiz command (diff) | |
added cooldown to the quiz command and more refinement and also tested.
| -rw-r--r-- | bot/seasons/evergreen/trivia_quiz.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/seasons/evergreen/trivia_quiz.py b/bot/seasons/evergreen/trivia_quiz.py index 2398cb40..9a7738a4 100644 --- a/bot/seasons/evergreen/trivia_quiz.py +++ b/bot/seasons/evergreen/trivia_quiz.py @@ -26,6 +26,7 @@ WRONG_ANS_RESPONSE = [ class TriviaQuiz(commands.Cog): """A cog for all quiz commands.""" + def __init__(self, bot: commands.Bot) -> None: self.bot = bot self.questions = self.load_questions() @@ -69,6 +70,7 @@ class TriviaQuiz(commands.Cog): # Stop game if running. if self.game_status[ctx.channel.id] is True: await self.stop_quiz(ctx.author, ctx.channel) + return category = category.lower() # Send embed showing available categories if inputted category is invalid. @@ -205,7 +207,6 @@ class TriviaQuiz(commands.Cog): self.game_player_scores[channel.id] = {} else: await channel.send(f"{author.mention}, you are not authorised to stop this game :ghost: !") - return @quiz_game.command(name="leaderboard") async def leaderboard(self, ctx: commands.Context) -> None: |