From 804fffbe6dcbbd4fb17303996b5a423b8f96f3fe Mon Sep 17 00:00:00 2001 From: Shubhendra Kushwaha Date: Sun, 3 Oct 2021 18:12:27 +0530 Subject: [PATCH] Shuffle quiz questions --- vidya/ext/help.py | 3 +-- vidya/ext/quiz.py | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vidya/ext/help.py b/vidya/ext/help.py index 0730fe0..97d3faa 100644 --- a/vidya/ext/help.py +++ b/vidya/ext/help.py @@ -19,14 +19,13 @@ Command, Cog, HelpCommand, -) + ) Mapping = Dict[Cog, List[Command]] class VidyaHelpCommand(HelpCommand): """Custom help command.""" - def __init__(self): super().__init__() diff --git a/vidya/ext/quiz.py b/vidya/ext/quiz.py index f92cb10..a2d7548 100644 --- a/vidya/ext/quiz.py +++ b/vidya/ext/quiz.py @@ -17,6 +17,7 @@ # along with this program. If not, see . import asyncio +from random import shuffle import time from typing import TYPE_CHECKING @@ -79,6 +80,7 @@ def button(o): return Button(label=o, custom_id=o) components = list(map(button, quiz.options)) + shuffle(components) message = await ctx.send( embed=embed, components=[components],