Quiz Module

class Quiz(*args: Any, **kwargs: Any)

Bases: Cog

A 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.

Permissions

Author: Administrator

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async quiz_start_text(ctx)

Start a LoveLive! quiz with customizable filters and options.

Permissions

Author: Administrator

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

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.

Permissions

Author: Everyone (subject to channel/guild command restrictions)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

Syntax:

/quiz answer
async quiz_submit(interaction: Interaction)

Submit a quiz question for review and inclusion in Chiichan Quizzes.

Permissions

Author: Everyone (subject to channel/guild command restrictions)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

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.

Permissions

Author: Everyone (subject to channel/guild command restrictions)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

Syntax:

/quizaccept
async quiz_start(interaction: Interaction)

Start a LoveLive! quiz with customizable filters and options.

Permissions

Author: Everyone (subject to channel/guild command restrictions)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

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

Permissions

Author: Administrator

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async quiz_count(ctx)

Check the number of questions currently stored in quiz_questions.

Aliases: qc

Permissions

Author: Everyone (subject to channel/guild command restrictions)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async quiz_submissions_toggle(ctx, state: str)

Toggle whether users can submit new quiz questions.

Usage: !!quizsubmissions on/off

Permissions

Author: Administrator

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async quiz_leaderboard(ctx)

Display quiz submission leaderboard and statistics from quiz_questions in the database.

Aliases: qlb

Permissions

Author: Everyone (subject to channel/guild command restrictions)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)