This is an online quiz bot for Telegram, developed with Node.js, MongoDB, and TypeScript. Users can take quizzes, track their scores, and receive instant feedback. Admins can create, update, and manage quiz questions directly in MongoDB.
- Multiple-choice quizzes: Users answer questions and receive feedback.
- Score tracking: Users’ scores are stored in MongoDB.
- Admin controls: Add and manage questions in MongoDB.
- User-friendly interface: Interactive commands and buttons for easy navigation.
- Node.js: Server runtime
- MongoDB: Database to store questions and scores
- TypeScript: Type-safe JavaScript superset for maintainable code
- Telegram Bot API: Interface to interact with users on Telegram
Ensure you have the following installed:
-
Clone this repository:
git clone https://github.com/yourusername/online-quiz-telegram-bot.git cd online-quiz-telegram-bot
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env
file in the root directory and add the following:BOT_TOKEN=your-telegram-bot-token MONGODB_URI=your-mongodb-uri