How to give a Discord role for answering a quiz question
A quiz can be a simple way to give a member a low-risk acknowledgement role after they demonstrate they read something. Build Discord Bots has a Quiz Roles module for exactly that shape: a manager posts one question with two to four button choices, each member gets one saved answer, and a correct answer attempts to grant the selected Discord role. It is not a multi-question test, a retryable quiz, or a role gate that can undo an existing grant.
Start freeStart free. Pro is $9.99/month.
Before you start
- Have a Build Discord Bots bot online in the server you manage. Quiz Roles is a Free module, but it is off for each server until you enable and save it in the dashboard.
- Create an ordinary reward role such as Quiz Passed. The bot needs Manage Roles, and its highest Discord role must be above that reward role. A non-owner manager creating the quiz must also be above the reward role.
Enable Quiz Roles for the server
Open the bot’s Modules tab, turn on Quiz Roles if it is not selected, then use the module card’s Settings button. Choose the server in the Server selector, turn on Enable in this server, and save. The per-server switch is deliberately off by default, including for existing bots, so publishing is unavailable until that saved setting is on.
The same settings let you choose an optional Default quiz channel and optional Quiz manager role. Leaving the channel blank makes a new quiz use the command channel. Members with Manage Server can manage quizzes; a saved manager role can do so too. These settings do not bypass Discord channel access or role hierarchy.
Prepare a safe reward role
Use a dedicated, ordinary role for the first test, rather than a staff, billing, or access-critical role. Discord will not let the module grant @everyone, a managed integration role, or a role at or above the bot’s highest role. The bot checks Manage Roles and the hierarchy again when it handles a correct button press.
Put the bot’s highest role above Quiz Passed in the server role list before publishing. If someone other than the server owner will create a quiz, their highest role must also be above Quiz Passed. This means the selected role is checked at creation time rather than relying only on the dashboard setting.
Publish one question with 2–4 choices
In Discord, run /quizrole create. Supply a question, a pipe-separated options value, the number of the correct choice, and the reward role. For example: /quizrole create question:What is 2 + 2? options:Three | Four correct:2 role:@Quiz Passed. The question is one prompt, not a series; the options parser accepts from two through four distinct choices.
You can optionally choose a text or announcement channel in the command. Otherwise the module posts in the saved default channel, or the channel where the manager ran the command. It only posts where the bot can view and send messages and the manager can view the channel. A successful post uses buttons labelled for the numbered choices.
Check the one-attempt result
Ask a consenting test member to press one button. Their first selection is saved for that quiz, whether it is right or wrong. A correct selection makes the bot attempt to add the configured role; a wrong selection is final, and a second button press reports that the answer was already used. The result reply is private to the member.
Confirm the correct test member now has Quiz Passed. If the role grant fails because the hierarchy or Manage Roles permission changed, the member’s answer is still consumed. Fix the Discord role setup before publishing a replacement quiz; do not promise a retry through this module.
Review or close the active quiz
Run /quizrole list to privately review active questions with their reward roles and saved attempt and correct counts. The Free plan permits one active quiz per server. Pro permits up to 10 active quizzes per server. Those are active-quiz caps, not a limit on how many members can answer an active question.
When the question is finished, run /quizrole close id with its quiz ID. Closing immediately stops new answers and frees an active-quiz slot, but it does not remove roles already granted. Turning off the per-server Quiz Roles setting also makes quiz buttons report that answers are closed.
Frequently asked questions
Can a member try the quiz again after choosing a wrong answer?
No. The first button selected is permanently saved for that member and quiz. A wrong answer is final, and a correct answer only attempts one role grant.
How many choices can a Quiz Roles question have?
Each question has two to four distinct choices. It is one question per quiz, not a multi-question questionnaire.
What is the Free versus Pro quiz limit?
Free includes one active quiz per server. Pro includes up to 10 active quizzes per server. Closing a quiz frees a slot without removing roles it already granted.
