A Discord bot that facilitates games of The Resistance: Avalon for 5-10 players.
- Complete game management: From lobby creation to role assignment to mission voting
- Interactive Discord UI: Uses buttons and embeds for smooth gameplay
- Private role information: Sends role details via DMs with proper information for each role
- Automated game flow: Handles team proposals, voting, missions, and win conditions
- Full Avalon experience: Includes all core roles (Merlin, Assassin, Percival, Morgana, Mordred)
-
Install dependencies:
pip install -r requirements.txt
-
Create a Discord Bot:
- Go to Discord Developer Portal
- Create a new application and bot
- Copy the bot token
- In the "Bot" tab, under "Privileged Gateway Intents", enable both Server Members Intent and Message Content Intent.
- Go to "OAuth2" → "URL Generator":
- Scopes: check
bot
andapplications.commands
- Bot Permissions:
- Send Messages
- Send Messages in Threads
- Embed Links
- Read Message History
- Add Reactions
- Use Application Commands (slash commands)
- Scopes: check
-
Configure environment:
cp .env.example .env # Edit .env and add your bot token
-
Run the bot:
python3 -m avalon
Important: For the best experience, please enable "Allow direct messages from server members" in your Discord server's privacy settings. This allows the bot to send you your role and other private information directly.
- Use
/avalon_start
in any Discord channel - Players click "Join Game" to join the lobby (5-10 players needed)
- Host clicks "Start Game" when ready
- Role Assignment: Each player receives their role via DM
- Team Proposal: The current leader receives a private message with interactive buttons to select and propose a team.
- Team Voting: All players vote to approve/reject the proposed team in the main channel.
- Mission: Approved team members vote on mission success/failure via DM. The results are then announced publicly.
- Repeat: Continue until 3 missions succeed (good wins) or 3 fail (evil wins).
- Assassination: If the good team wins 3 missions, the Assassin receives a private message with interactive buttons to choose and assassinate their target.
The bot provides a comprehensive game summary that is updated after each key event. It includes:
- The current round and mission leader
- The full mission track, including player counts for each mission and any special conditions (like 2 fails required)
- The vote track for rejected teams
Good Team (Servants of Arthur):
- Merlin: Knows all evil players (except Mordred)
- Percival: Sees both Merlin and Morgana (doesn't know which is which)
- Servant of Arthur: Regular good player
Evil Team (Minions of Mordred):
- Assassin: Can assassinate Merlin if good team wins
- Morgana: Appears as Merlin to Percival
- Mordred: Hidden from Merlin's sight
- Minion of Mordred: Regular evil player
/avalon_start
- Create a new game lobby
- Players: 5-10 players
- Objective:
- Good: Complete 3 out of 5 missions
- Evil: Fail 3 missions OR assassinate Merlin
- Mission Sizes: Vary by player count
- Special Rules: Some missions require 2 fail votes to fail
- Vote Track: 5 consecutive team rejections = evil wins
Enjoy your game of Avalon! 🏰