Skip to content

himanshujain112/HackLeague

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HackLeague Discord Bot

HackLeague - Discord Bot

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.


Features

  • 🚀 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.

Installation

Prerequisites

  • Python 3.10 or higher
  • A Discord bot token
  • A .env file with the following variables:
    DISCORD_TOKEN=<your_discord_bot_token>
    GEMINI_KEY=<your_gemini_api_key>
    

Steps

  1. Clone the repository:

    git clone <repository_url>
    cd HackLeague
  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up the .env file:

    • Create a .env file in the root directory.
    • Add your DISCORD_TOKEN and GEMINI_KEY as shown above.
  4. Run the bot:

    python bot.py

Commands

General Commands

  • /ping: Check if the bot is online and responsive.
  • /help: Display a list of available commands.

Challenge 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 Thresholds for Roles

XP Role
100 Beginner Coder
300 Intermediate Coder
700 Elite Coder
1500 HackLeague Champion
3000 HackLeague Legend

Contributing

We welcome contributions to HackLeague! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Submit a pull request with a detailed description of your changes.

Support

If you encounter any issues or have questions, feel free to open an issue in the repository or contact the project maintainer.


License

This project is licensed under the MIT License. See the LICENSE file for details.


Acknowledgments

  • Discord.py for the bot framework.
  • Google GenAI for AI-powered validation.
  • All contributors and users for their support and feedback.

About

an AI-powered Discord bot designed to challenge, review, and improve your coding skills!

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages