A Discord bot implementation of the social deduction game Blood on the Clocktower.
- Install dependencies:
pip install discord.py- Set your Discord bot token:
export TOKEN=your_discord_bot_token- Run the bot:
python discord_bot.py| Command | Description |
|---|---|
!test |
Enable test mode (single user plays all characters) |
!start player1 player2 ... |
Start game with 5-15 players |
!night |
Progress to night phase |
!state |
Show game state and player circle |
!debug |
Show all roles (debug info) |
!guide |
Show command help |
!end |
End current game |
Normal Mode:
!action <targets>- Submit your action- Example:
!action Alice Bob
Test Mode:
!action <character> <targets>- Submit action for character- Example:
!action Diana Alice Bob
Both modes require !confirm or !cancel after submission.
- Setup: Use
!startwith 5-15 player names - Night 0: Automatically executes, sends role DMs
- Day/Night Cycles: Use
!nightto progress phases - Night Actions: Players submit actions via DM
- Win Conditions: Game ends automatically when conditions are met
- Role Distribution: Automatic based on player count
- Test Mode: Single user controls all characters for testing
- Rich Discord Integration: Embeds, DMs, visual player circle
- Multi-Server Support: Independent games per Discord server
- Action Validation: Proper targeting and confirmation system
- Win Detection: Automatic good vs evil team victory conditions
| Players | Townsfolk | Outsiders | Minions | Demons |
|---|---|---|---|---|
| 5 | 3 | 0 | 1 | 1 |
| 6 | 3 | 1 | 1 | 1 |
| 7 | 5 | 0 | 1 | 1 |
| 8 | 5 | 1 | 1 | 1 |
| 9 | 5 | 2 | 1 | 1 |
| 10 | 7 | 0 | 2 | 1 |