A fun, Gen-Z style Telegram bot that helps coordinate smoke breaks for your squad. Now in Russian! ๐ท๐บ
- Automatic Registration: The bot automatically registers anyone who sends a message in the group.
- Interactive Smoke Calls:
/smoke- Mentions everyone in the squad with a random fun message (Gen-Z style ๐คช).- Bot Mention: The bot also responds to being mentioned (e.g.,
@botname) with a smoke call. - Weather Info: Shows current weather in Almaty. ๐ก๏ธ
- "I'm going!" Button: Interactive button that toggles your participation. Changes to "ะฏ ะฟะตัะตะดัะผะฐะป... ๐ข" when you've joined.
- Auto-join: The person who calls smoke is automatically added to the participants list.
- Leaderboards & Stats:
/smoke_stats- Shows smoke stats and leaderboards for day/week/month. ๐/smoke_history- Interactive history viewer with buttons for Today/Week/Month/All time.
- Weather Features:
/weather_info- Get current weather forecast using Open-Meteo API./weather_subscribe- Toggle daily weather notifications at 9:00 AM on workdays.
- Management:
/smoke_leave- Opt-out of notifications (checks if already opted out)./smoke_join- Opt-in again (checks if already opted in).
Set these commands in BotFather:
start - Start the bot
smoke - Call a smoke break ๐ฌ
smoke_stats - View smoke statistics ๐
smoke_history - View smoke history ๐
weather_info - Get weather forecast ๐ค๏ธ
weather_subscribe - Toggle daily weather ๐
smoke_leave - Leave smoke notifications
smoke_join - Join smoke notifications
- Get a Bot Token: Talk to @BotFather on Telegram to create a new bot and get your token.
- Configure Environment:
- Create a
.envfile. - Add your token:
TELEGRAM_BOT_TOKEN=your_token_here
- Create a
docker compose up -d- Install Dependencies:
uv sync
- Run the Bot:
uv run main.py
The bot uses SQLite to save participants and stats. When using Docker, data is persisted in the ./data directory.
The bot automatically migrates from the old schema (user_id + chat_id as primary key) to the new schema (user_id only) on first run. Your data is preserved.
All bot actions are logged to bot.log for debugging and monitoring.