@DixitRBot is a Telegram bot designed for playing DIXIT: 9 Lives Mod — a two-player adaptation of the popular board game DIXIT, focused on deep associative gameplay and turn-based storytelling.
- Deployed to PythonAnywhere for 24/7 availability
- Added
pythonanywhere_starter.pyfor seamless deployment on the platform
- Implemented a 1 match per day per user policy (for completed games only)
- Added
can_start_new_game(user_id)logic to enforce daily limits - Automatically removes unfinished sessions before starting or joining a new game
- All handlers (
/dixit_match_starter,handle_join_session) updated accordingly
- Fixed a critical issue where cards could repeat in a single round
Replaced
random.choicewithrandom.sampleto ensure card uniqueness
requirements.txt— for quick setup with all dependenciespythonanywhere_starter.py— simple entry point for hosted environments- Database schema updated to store game history and track last game time
The game is designed for two players and consists of nine rounds. Players take turns assuming the roles of:
♦️ Mysterious Narrator — selects one card and gives an associative clue♠️ Guesser — tries to pick the correct card based on the clue
Points are scored based on successful guesses, and the player with the most points after 9 rounds wins.
- Fully interactive two-player card game experience in Telegram
- Persistent game state with SQLite3
- Game roles automatically assigned and swapped
- Built-in image card system with randomized delivery
- Round-based logic and scoring
- Unique stickers, buttons, and UI feedback
- 1 game per user per day enforcement
- Automatic cleanup of abandoned sessions
- Hosted 24/7 on PythonAnywhere
- Click the button "💫 DIXIT: Start a new game 💫"
- Follow the instructions sent by the bot
- Invite your partner to join using the
/joincommand - The game will begin once both players are connected to the same session
- Roles: Players alternate between
♦️ Mysterious Narrator and♠️ Guesser - Clues: Narrators give associative clues based on their selected card
- Guessing: The Guesser selects the card they believe matches the clue
- Scoring: Points are awarded for correct guesses; special rules apply on turn 5
- Victory: The player with the highest total score after 9 rounds wins
- Start a new game with the
/startcommand - Use
/jointo invite your partner to join the same session - Wait for both players to receive card sets
- Use intuitive buttons to mark the guesses and swap roles each round
- After 9 turns, the bot automatically announces the winner
/start— launches the game and displays the Start button/join— allows the second player to connect to an existing session/help— shows game rules and usage instructions
To run the bot yourself:
-
Install dependencies:
pip install -r requirements.txt
-
Create the SQLite database (see
DIXIT_db.pyordb.pyif applicable) -
Set your API token in
config.py -
Launch the bot:
python main.py
This is a non-commercial project that:
- Doesn't collect or store personal data
- Doesn't retain any messages, photos, or gameplay history after the game ends
- Stores minimal session data temporarily for gameplay purposes only
- Uses official Telegram Bot API and adheres to its privacy practices






