Skip to content

Commit

Permalink
Shuffle quiz questions
Browse files Browse the repository at this point in the history
  • Loading branch information
TheShubhendra committed Oct 3, 2021
1 parent 8075f61 commit 804fffb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions vidya/ext/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@
Command,
Cog,
HelpCommand,
)
)

Mapping = Dict[Cog, List[Command]]


class VidyaHelpCommand(HelpCommand):
"""Custom help command."""

def __init__(self):
super().__init__()

Expand Down
2 changes: 2 additions & 0 deletions vidya/ext/quiz.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.

import asyncio
from random import shuffle
import time
from typing import TYPE_CHECKING

Expand Down Expand Up @@ -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],
Expand Down

0 comments on commit 804fffb

Please sign in to comment.