Skip to content
Dmitry Dushkevich
A ring of face-down cards on a round wooden table under a single lamp, a phone glowing at the edge.

Mafia Counter

A host's assistant for Mafia nights

Role
Solo developer
Year
2026
Status
Working Telegram bot
Kind
Game tool

A Telegram bot that runs the admin side of Mafia games. It deals roles, tracks who is out, scores every player and keeps a leaderboard in Google Sheets.

Why

Hosting a game of Mafia means juggling role cards, notes and a scoresheet at the same time. This bot takes that off the host's hands, so the host can watch the table instead of the paperwork.

How a game runs

The host picks players from a saved list or adds new ones, sets how many of each role to use, and the bot deals shuffled roles one by one.

At the end the host marks who was eliminated and adds any bonuses or penalties. Scores depend on the role, the winning side and whether the player survived. Every result goes to Google Sheets, and /leaderboard shows the top ten.

Under the hood

It is written in Python with python-telegram-bot. A multi-step conversation with inline keyboards walks the host through setup. gspread handles storage and creates the sheets on first run.

It supports 12 roles across three sides: citizens, mafia and the solo maniac.

Next project

Matte white and pale blue blocks snapped into a small tower, one block in red-orange.

Infra Kit

Azure infrastructure from one config file