A Discord bot designed to organize fair team selection for guild events, leagues, and activities. The bot ensures that all participants get selected before anyone is chosen again, making team selection balanced and fair over time.
- User-friendly registration system using reactions
- Fair "random" selection ensuring everyone gets a chance to participate
- Support for prioritizing specific members in team selection
- Ability to manually add or remove participants
- Discord timestamp integration for scheduling the next match
- Docker support for easy deployment
- Python 3.11 or higher
- Discord Bot Token from Discord Developer Portal
- Discord.py library and other dependencies
-
Clone the repository:
git clone https://github.com/yourusername/guild-league-team-maker.git cd guild-league-team-maker -
Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the root directory with your Discord bot token:DISCORD_BOT_TOKEN=your_discord_bot_token_here -
Run the bot:
python main.py
-
Clone the repository:
git clone https://github.com/yourusername/guild-league-team-maker.git cd guild-league-team-maker -
Create a
.envfile with your Discord bot token:DISCORD_BOT_TOKEN=your_discord_bot_token_here -
Build and run using Docker Compose:
docker-compose up -d
- Create a Discord application and bot in the Discord Developer Portal
- Enable necessary intents (Message Content, Reactions, and Server Members)
- Generate an invite URL with the proper permissions
- Invite the bot to your server
- Use
/registerin a channel to create a registration embed - Have users react with ✅ to join the participant pool
- When ready, use
/choose [number]to select team members - Optional parameters:
mention=Trueto automatically mention selected usersincluded_members="@User1 @User2"to always include specific members
| Command | Description | Parameters |
|---|---|---|
/register |
Creates a registration embed for users to join | None |
/choose |
Selects random participants from the registration list | number: Number of participants to choosemention: Whether to mention selected usersincluded_members: Members to always include |
/add |
Manually adds a user to the participant list | member: The Discord member to add |
/delete |
Removes a user from the participant list | member: The Discord member to remove |
/help |
Displays help information | visible: Whether to make response visible to everyone |
-
Create a registration embed:
/register -
Select 5 random participants:
/choose number:5 -
Select 10 participants, including specific members:
/choose number:10 included_members:"@User1 @User2" -
Select 8 participants and mention them:
/choose number:8 mention:True
The bot maintains a list of participants for each channel, tracking who has been selected previously. When choosing team members:
- It first includes any specified mandatory members
- It then selects random participants who haven't been chosen yet
- If more members are needed than are available, it resets everyone's selection status and continues selection
- This ensures a fair rotation of participants over multiple team selections
This project is licensed under MIT.
Contributions are welcome! Please feel free to submit a Pull Request.