Every user who messages your bot gets a dedicated Forum Topic in your admin group. Two-way relay, full media support, admin commands — deployed in minutes.
Any Telegram user messages the bot privately. All media types are supported — text, photos, videos, files, voice, audio, stickers, GIFs, video circles, location, and contacts.
On first contact, the bot creates a dedicated Forum Topic in your private admin group named after the user. Every subsequent message threads into that topic automatically.
Any admin replies inside the forum topic are forwarded back to the user's private DM in real time. Use
/close to resolve and archive the ticket.
Text, photos, videos, documents, voice messages, audio, stickers, GIFs, video circles, location pins, and contacts — all relayed bidirectionally.
Sessions open on /start, can be closed with /close, and reopen automatically when
a user contacts the bot again after resolution.
Block spamming or abusive users directly from within their support topic using /ban. Lift
restrictions instantly with /unban.
Send a message to all active, non-banned users at once using /broadcast — perfect for outage
notifications or product updates.
Check total sessions, active tickets, banned users, and today's message activity at any time with
/stats via private DM.
Per-user message throttling prevents flooding. Configure the message limit and time window via environment variables.
The bot reacts to each user message with a thumbs-up emoji the moment it's forwarded — a subtle, non-intrusive confirmation.
All sessions, ban states, and timestamps are stored in a lightweight SQLite database. No external DB required.
No polling. PTB runs on a dedicated asyncio thread inside Gunicorn, with a /health endpoint
for uptime monitors.
👤 User — private DM with bot
🛡️ Admin — inside a group forum topic
🔑 Admin — private DM with bot
Message @BotFather on Telegram, send /newbot, and copy the API token it
gives you.
Create a private Telegram group, enable Topics in settings, and add your bot as an admin with the Manage Topics permission.
Forward a message from your group to @userinfobot to get the Group ID. DM it directly to get your personal User ID.
Fork the repo, create a new Web Service on Render, set
gunicorn main:flask_app as the start command, and add the environment variables.
Message your bot on Telegram. A Forum Topic is created instantly in your group. You're live.
Environment variables
# Clone & run locally
git clone github.com/Artemis43/telegram-support-bot
cd telegram-support-bot
cp .env.example .env
# edit .env with your values
pip install -r requirements.txt
python main.py
Open source, MIT licensed. Deploy to Render in under five minutes.