HackLeague is an AI-powered coding judge and leaderboard bot designed for Discord servers. It enables users to participate in daily coding challenges, submit solutions, and earn XP to climb the leaderboard. The bot also provides AI-driven feedback to help users improve their coding skills.
- 🚀 Daily Coding Challenges: Generate coding challenges of varying difficulty (
easy,medium,hard) for users to solve. - 🤖 AI-Powered Code Validation: Validate user submissions using AI and provide structured feedback.
- 🏆 Leaderboard System: Track user XP and streaks to rank participants in the server.
- 🔥 Streak Rewards: Encourage consistent participation with streak bonuses.
- 🎭 Role Assignment: Automatically assign roles based on XP thresholds.
- 📊 User-Friendly Commands: Intuitive commands for interacting with the bot.
- Python 3.10 or higher
- A Discord bot token
- A
.envfile with the following variables:DISCORD_TOKEN=<your_discord_bot_token> GEMINI_KEY=<your_gemini_api_key>
-
Clone the repository:
git clone <repository_url> cd HackLeague
-
Install dependencies:
pip install -r requirements.txt
-
Set up the
.envfile:- Create a
.envfile in the root directory. - Add your
DISCORD_TOKENandGEMINI_KEYas shown above.
- Create a
-
Run the bot:
python bot.py
/ping: Check if the bot is online and responsive./help: Display a list of available commands.
/challenge <difficulty>: Generate a daily coding challenge (easy,medium,hard)./assign_role: Automatically assign a role to users who participate./leaderboard: See which members top the coding charts in your server./streaks: Track your daily participation and streaks like GitHub contributions.
| XP | Role |
|---|---|
| 100 | Beginner Coder |
| 300 | Intermediate Coder |
| 700 | Elite Coder |
| 1500 | HackLeague Champion |
| 3000 | HackLeague Legend |
We welcome contributions to HackLeague! To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a detailed description of your changes.
If you encounter any issues or have questions, feel free to open an issue in the repository or contact the project maintainer.
This project is licensed under the MIT License. See the LICENSE file for details.
- Discord.py for the bot framework.
- Google GenAI for AI-powered validation.
- All contributors and users for their support and feedback.