Quiz Module
- class Quiz(*args: Any, **kwargs: Any)
Bases:
CogA module to run LoveLive! quizzes within your guild. The questions database is still a WIP.
Attention
All commands assume minimum bot permissions: View Channel, Send Messages.
- quiz = <discord.app_commands.commands.Group object>
- async quiz_set_explanation(ctx, question_id: int, *, explanation: str)
Developer/admin command to set the explanation for a quiz question.
Usage: !!quizsetexp <id> explanation text here Everything after the numeric id is stored as the explanation (quotes optional). This will set or overwrite the explanation for the given row in quiz_questions.
- async quiz_start_text(ctx)
Start a LoveLive! quiz with customizable filters and options.
- async quiz_answer(interaction: Interaction, choice: Choice[str])
Answer the active quiz question in this channel. Your answer is processed based on when you initiated the command, so even if a new question appears, you’ll get credit for the question you tried to answer.
Syntax:
/quiz answer
- async quiz_submit(interaction: Interaction)
Submit a quiz question for review and inclusion in Chiichan Quizzes.
Syntax:
/quiz submit
- async quiz_accept_slash(interaction: Interaction, message_id: str | None = None, existing_id: int | None = None)
Slash command version of quiz accept, for LLR admins.
Opens a modal prefilled with the submitted question and correct answer so the admin can review/edit and provide other fields before saving into the SQL table.
Syntax:
/quizaccept
- async quiz_start(interaction: Interaction)
Start a LoveLive! quiz with customizable filters and options.
Syntax:
/quiz start
- async quizdeny(ctx, message_id: int, *, reason: str = None)
Deny a quiz question submission. Optionally include a reason that will be sent to the user.
Aliases:
qd
- async quiz_count(ctx)
Check the number of questions currently stored in quiz_questions.
Aliases:
qc
- async quiz_submissions_toggle(ctx, state: str)
Toggle whether users can submit new quiz questions.
Usage: !!quizsubmissions on/off
- async quiz_leaderboard(ctx)
Display quiz submission leaderboard and statistics from quiz_questions in the database.
Aliases:
qlb