Skip to content

a discord bot gating server access behind completion of a user-defined quiz

Notifications You must be signed in to change notification settings

BoringBoredom/Discord-Access-Quiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How does it work?

  • The bot waits for reactions to the user-defined message and initiates a user-defined quiz through DM with people who reacted. If they pass, a user-defined role will be assigned / removed or both. If they fail, an optional cooldown will be applied.

Prerequisites

Dependencies

  • Open the command line in the folder containing app.js and type npm install. This will download the required discord.js files.

config.json

  • bot_token (string)

    discord bot token
  • start_message_url (string)

    URL of the message that initiates the quiz
  • time_limit (integer)

    minutes
  • max_wrong_answers (integer)

  • question_count (integer)

    number of questions to fetch at random from quiz.json
  • failure_cooldown (integer)

    hours
  • cooldown_multiplier (integer)

    e.g. 2: each failed attempt doubles the cooldown
    • add (string)

      ID of role to assign after completion
    • remove (string)

      ID of role to remove after completion

quiz.json

  • infinite number of questions
  • 1 correct answer per question
  • 1 to 4 incorrect answers per question
  • positions are randomized

Starting the bot

  • Open the command line in the folder containing app.js and type node app.js

About

a discord bot gating server access behind completion of a user-defined quiz

Topics

Resources

Stars

Watchers

Forks