Discord QuizBot is an interactive bot designed to facilitate fun and engaging quizzes on your Discord server. It allows users to participate in multiple-choice quizzes, track their scores, and compete with friends. The bot also offers a leaderboard to display the top performers and provides admin-only customization options for quiz management.
- Interactive Quizzes: Host multiple-choice quizzes directly within Discord.
- Score Tracking: Automatically track user scores for each quiz.
- Leaderboard: Showcase the top performers in real-time.
- Admin Customization: Only authorized admins can customize quiz questions and settings.
Follow these steps to install and set up the Discord QuizBot:
-
Clone the repository:
git clone https://github.com/manojk242003/Discord-QuizBot.git
-
Navigate to the frontend directory:
cd Discord-QuizBot/AdminPanel -
Install the frontend dependencies:
npm install
-
Navigate to the backend directory:
cd ../AdminPanel_backend -
Install the backend dependencies:
npm install
To set up the Python virtual environment and install dependencies:
- Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate pip install discord.py requests pymongo python-dotenv
- Create and activate a virtual environment:
python -m venv venv venv\Scripts\activate pip install discord.py requests pymongo python-dotenv
-
Set up your Discord bot:
Go to the Discord Developer Portal, create a new bot, and add it to your server. Then, create a.envfile in the root directory and add your Discord bot token:TOKEN=your_discord_bot_token_here -
Set up MongoDB:
Create a project and database in MongoDB Atlas. Add the MongoDB connection URL to the.envfile:MONGO_DB_URL=your_mongo_db_url_here -
Run the Frontend:
Start the frontend development server from theAdminPaneldirectory:npm run dev
-
Run the Backend:
Start the backend server from theAdminPanel_backenddirectory:npx nodemon
-
Start the QuizBot:
From the root directory, run the quiz bot:python3 quizbot.py
Once the bot is running on your Discord server, you can use the following command:
wec_quiz:
Lists the available quizzes. After selecting a quiz, the bot will display the questions one by one, allowing users 30 seconds to answer each question. Upon quiz completion, users can view their rank and the top 10 players on the leaderboard.
A deployed version of the Admin Panel is available in the repository's About section. To sign in, simply click the "Sign In" button; the default username and password are included in the code for demonstration purposes.
Join the server where the bot is currently active:
Discord Server Invite Link
Check out the video demo for a walkthrough of the bot's features and functionality.
This guide walks you through the installation, setup, and usage of the Discord QuizBot, enabling you to seamlessly host quizzes and enhance user interaction in Discord community!