I Got Tired of Manually Managing My Paid Telegram Channel, So I Built a Bot

Published: (March 3, 2026 at 08:20 PM EST)
3 min read
Source: Dev.to

Source: Dev.to

Introduction

Last month I was spending hours every week doing the same boring tasks: checking who paid, generating invite links, and removing people whose subscriptions expired. Classic manual work that screams “automate me.” So I built a Python bot to handle everything automatically.

Problem Statement

Running a paid Telegram channel sounds easy until you actually do it. My daily routine looked like this:

  1. New payment → manually check → manually create an invite link → send it.
  2. Subscription expires → manually check a spreadsheet → manually kick the user.
  3. Payment inquiry → dig through payment history.

Multiplying this by 50+ subscribers turned the channel into a part‑time job I didn’t sign up for.

Solution Overview

A Python bot that automates the entire workflow:

  • Payment: Users pay with Telegram Stars → bot verifies → bot sends an invite link.
  • Expiration: When a subscription expires, the bot kicks the user.
  • Reminders: The bot sends a reminder before a subscription expires.
  • Referral system: Referral links grant bonus days to both parties.
  • Promo codes: Discount codes can be created for launches, holidays, etc.

The whole thing runs on a $5 VPS and has been hands‑off for weeks.

Bot Architecture

FilePurpose
bot.pyHandles messages and payments
database.pyStores users, subscriptions, and payments
config.pyContains prices, messages, and tokens

A background task runs every hour to:

  • Check for expired subscriptions and kick users.
  • Send reminders before expiry.

Implementation Details

  • Framework: aiogram 3 – async and lightweight.
  • Database: SQLite – sufficient for a small‑scale channel.
  • Payments: Telegram Stars – built‑in to Telegram, no third‑party processors or KYC required.

Key Features

  1. Telegram Stars payment – Users buy Stars in the app and pay the bot directly.
  2. Auto‑invite links – After payment, the bot creates a one‑time invite link that expires after use.
  3. Auto‑kick – Users are removed automatically when their subscription ends.
  4. Referral system – Users share a link; both the referrer and the new subscriber receive bonus days.
  5. Promo codes – Easy creation of discount codes for special occasions.

Results

I spent a weekend building the bot. It now saves several hours each week and runs completely hands‑off. The automation eliminates manual checks, reduces errors, and prevents burnout.

Conclusion

If you’re running a paid Telegram channel and still handling everything manually, stop. Automating the workflow with a bot like this will save time and keep your community running smoothly.

Resources

  • Full source code, documentation, and deployment instructions are available.
  • Get it here if you want to skip the building part.
0 views
Back to Blog

Related posts

Read more »

No right to relicense this project

Hi, I'm Mark Pilgrim. You may remember me from such classics as Dive Into Python and Universal Character Encoding Detector. I am the original author of chardet....

Relicensing with AI-Assisted Rewrite

Disclaimer I am not a lawyer, nor am I an expert in copyright law or software licensing. The following post is a breakdown of recent community events and legal...