DEV Community

Castanderness
Castanderness

Posted on

I Built 9 Production-Ready Telegram Bots in Python (Open Source)

I Built 9 Production-Ready Telegram Bots in Python

TL;DR: 9 open-source Telegram bot templates — AI assistant, booking, crypto alerts, job channel, price monitor, restaurant, tutor, survey, auto-content. All free on GitHub.

The Bots

1. AI Assistant Pro (with subscription model)

Full freemium — 20 free messages/day, unlimited for premium users. SQLite database, admin panel.

@dp.message(F.text)
async def handle_message(message: Message):
    if not db.is_premium(user_id) and db.get_msg_count_today(user_id) >= FREE_DAILY_LIMIT:
        await message.answer("Limit reached!", reply_markup=premium_keyboard())
        return
    response = client.messages.create(
        model="claude-haiku-4-5-20251001",
        max_tokens=1024,
        messages=conversations[user_id],
    )
    await message.answer(response.content[0].text)
Enter fullscreen mode Exit fullscreen mode

2. Appointment Booking Bot

Barbershops, clinics, tutors. Interactive date/time picker, no double-booking, admin notifications.

3. Crypto Price Alert Bot

Set targets, get notified when BTC/ETH/SOL hits them. Free CoinGecko API, no key needed.

async def check_alerts():
    alerts = get_all_active_alerts()
    coins = list({a[2] for a in alerts})
    prices = get_prices(coins)
    for alert_id, user_id, coin, direction, target in alerts:
        price = prices.get(coin)
        hit = (direction == "above" and price >= target) or (direction == "below" and price <= target)
        if hit:
            await bot.send_message(user_id, f"Alert! {coin} hit ${price:,.2f}")
Enter fullscreen mode Exit fullscreen mode

4-9. More bots

Job vacancy channel (HH.ru API), Avito price monitor, restaurant reservations, English tutor, survey→Excel, auto-content scheduler.

Tech Stack

  • Python 3.12 + aiogram 3.7
  • SQLite (survives restarts)
  • Anthropic Claude Haiku (~$0.001/1000 messages)
  • APScheduler for cron jobs

GitHub

All 9 bots open source: https://github.com/Castanderness/telegram-bots-portfolio

Portfolio: https://castanderness.github.io/telegram-bots-portfolio/portfolio/

Available for freelance — $49+ per bot, 2-5 day delivery.

Top comments (0)