{"id":25001497,"url":"https://github.com/mansionnet/quizbot","last_synced_at":"2026-03-05T12:32:29.943Z","repository":{"id":271094270,"uuid":"912383173","full_name":"MansionNET/QuizBot","owner":"MansionNET","description":"Advanced IRC trivia bot powered by Mistral AI. Features multi-category quizzes, real-time scoring, and player statistics. Part of the MansionNET IRC Network Bot Suite.","archived":false,"fork":false,"pushed_at":"2025-02-11T07:49:35.000Z","size":99,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T15:22:15.554Z","etag":null,"topics":["irc","irc-bot","mistral-ai","mistral-api","python","quiz","quiz-bot","trivia","trivia-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MansionNET.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-05T12:29:43.000Z","updated_at":"2025-03-29T15:29:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"39fab816-57ff-4333-9e3f-9c21c4ab4487","html_url":"https://github.com/MansionNET/QuizBot","commit_stats":null,"previous_names":["mansionnet/quizbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MansionNET/QuizBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansionNET%2FQuizBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansionNET%2FQuizBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansionNET%2FQuizBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansionNET%2FQuizBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MansionNET","download_url":"https://codeload.github.com/MansionNET/QuizBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansionNET%2FQuizBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30124462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T11:11:57.947Z","status":"ssl_error","status_checked_at":"2026-03-05T11:11:29.001Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["irc","irc-bot","mistral-ai","mistral-api","python","quiz","quiz-bot","trivia","trivia-bot"],"created_at":"2025-02-04T20:35:22.297Z","updated_at":"2026-03-05T12:32:29.921Z","avatar_url":"https://github.com/MansionNET.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QuizBot for IRC\n\nA sophisticated IRC quiz bot powered by Mistral AI that delivers engaging trivia games with dynamic question generation and rich features.\n\n## 🌐 IRC Server Details\n\nJoin us on MansionNET IRC to chat with us, test the bot, and play some trivia! \n\n- **Server:** irc.inthemansion.com  \n- **Port:** 6697 (SSL)  \n- **Channel:** #opers, #general, #welcome, #devs (and many others)\n\n## 🌟 Features\n\n- **AI-Powered Questions**: Uses Mistral AI to generate unique, engaging questions across multiple categories\n- **Dynamic Game System**: Run multiple concurrent quiz games in different IRC channels\n- **Smart Scoring**: Points system based on answer speed and winning streaks\n- **Rich Categories**: Questions from various domains including geography, history, science, arts, entertainment, sports, and more\n- **Player Statistics**: Track player performance, streaks, and maintain leaderboards\n- **Fallback System**: Built-in backup questions ensure continuous operation even if AI service is unavailable\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Python 3.10 or higher\n- SQLite3\n- Mistral AI API key\n- IRC server access\n\n### Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/mansionNET/QuizBot.git\ncd quizbot_mansionnet\n```\n\n2. Create and activate a virtual environment:\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows use: venv\\Scripts\\activate\n```\n\n3. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n4. Copy the example environment file:\n```bash\ncp .env.example .env\n```\n\n5. Edit `.env` with your configuration:\n```env\nMISTRAL_API_KEY=your_api_key_here\nIRC_SERVER=irc.inthemansion.com\nIRC_PORT=6697\nIRC_NICKNAME=QuizBot\nIRC_CHANNELS=#yourchannel\nADMIN_USERS=admin1,admin2\nQUESTIONS_PER_GAME=10\nQUESTION_TIMEOUT=30\nMIN_QUESTIONS=20\n```\n\n### Running the Bot\n\nStart the bot:\n```bash\npython src/main.py\n```\n\n## 🎮 Game Commands\n\n- `!quiz` - Start a new quiz game\n- `!help` - Show available commands\n- `!stats` - Display your game statistics\n- `!leaderboard` - Show top players\n- `!stop` - Stop the current game (admin only)\n\n## 🎯 Game Rules\n\n1. Each game consists of a configurable number of questions (default: 10)\n2. Players have a limited time to answer each question (default: 30 seconds)\n3. Points are awarded based on:\n   - Speed of answer (faster = more points)\n   - Answer streak (consecutive correct answers multiply points)\n4. Only the first correct answer for each question counts\n5. Multiple answer formats are accepted for flexibility\n\n## 🛠️ Configuration\n\nKey configuration options in `.env`:\n\n- `QUESTIONS_PER_GAME`: Number of questions per game session\n- `QUESTION_TIMEOUT`: Seconds allowed for answering each question\n- `MIN_QUESTIONS`: Minimum questions to keep in database\n- `BASE_POINTS`: Base points for correct answers\n- `SPEED_MULTIPLIER_MAX`: Maximum multiplier for quick answers\n\n## 📚 Question Categories\n\n- Geography\n- History\n- Science\n- Arts\n- Entertainment\n- Sports\n- Food \u0026 Drink\n- Nature\n\n## 🧩 Technical Architecture\n\n- **IRC Service**: Handles IRC connection and message routing\n- **Game Manager**: Manages game states and player interactions\n- **Question Service**: Generates and manages questions using Mistral AI\n- **Database**: SQLite storage for questions and player statistics\n- **Utilities**: Answer validation, scoring, and text processing\n\n## 🔧 Development\n\n### Project Structure\n```\nquizbot_mansionnet/\n├── src/\n│   ├── models/                   # Data models\n│   │   ├── __init__.py\n│   │   ├── database.py           # Database connection and queries\n│   │   ├── question.py           # Question management\n│   │   └── quiz_state.py         # Quiz game state handling\n│   ├── services/                 # Core services\n│   │   ├── __init__.py\n│   │   ├── irc_service.py        # IRC connection handling\n│   │   ├── mistral_service.py    # AI question generation\n│   │   └── question_service.py   # Question management service\n│   ├── utils/                    # Utility functions\n│   │   ├── __init__.py\n│   │   ├── answer_normalizer.py  # Answer validation\n│   │   ├── scoring.py            # Points calculation\n│   │   ├── text_processing.py    # Text manipulation utilities\n│   │   └── validators.py         # Input validation\n│   ├── __init__.py\n│   ├── bot.py                    # Main bot class\n│   ├── config.py                 # Configuration handling\n│   ├── game_manager.py           # Game state management\n│   └── main.py                   # Entry point\n├── .env                          # Environment configuration\n├── requirements.txt              # Python dependencies\n├── setup.py                      # Package setup\n```\n\n### Adding New Features\n\n1. Fork the repository\n2. Create a feature branch\n3. Add your changes\n4. Write/update tests\n5. Submit a pull request\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 🙏 Acknowledgments\n\n- Mistral AI for the question generation capabilities\n- IRC community for testing and feedback\n- All contributors and users\n\n## 📞 Support\n\nFor support, please:\n1. Check existing issues\n2. Create a new issue with detailed description\n3. Join our IRC channel for direct help\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmansionnet%2Fquizbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmansionnet%2Fquizbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmansionnet%2Fquizbot/lists"}