Shahria Emon
W-02Article · 7 min read

How to Automatically Remove Members From a Paid Telegram Channel (Without Removing the Wrong Ones)

Shahria EmonAI, trading & Web3 engineer · COO, Core Devs LtdPublished

If you run a paid Telegram channel, you can automatically remove members who stop paying, trading or qualifying. The hard part is not the removal. It is making sure the bot never removes someone who should stay.

I led the build of a bot that does this for a forex signals channel with about 56,000 members, 4.7 times the size in the original brief. Its first dry run flagged nearly one in three of the members it checked. This article covers how the system works, what happened on go-live day, and the safeguards that came out of it.

Watch it run

Login, member CRM, kicked list, rules enforcement, bot messages, IB network and the partner view.

Project Nexus · Member CRM

Walkthrough of the real interface with demo data. 30 seconds, no sound.

Can a Telegram bot remove members from a channel?

Yes. A bot that is an admin of the channel can approve and decline join requests, and remove and unban members, through the Telegram Bot API. If the channel uses join-request approval, subscribers see no "joined" or "removed" messages, so removals stay private.

This matters more than it sounds. On Nexus, the first version was built on a Telegram group because of a belief that bots can't manage channels. In a group, every member sees who was accepted and who was removed. We tested the belief against the live API, and moving to a channel turned out to be a configuration change. I wrote about that in taking over a software project mid-milestone.

Why manual removal stops working

The channel owner is a master Introducing Broker on Vantage, running a gold signals service. Members should stay only while they trade through his IB network.

When we scoped Nexus, the support team was checking every member's broker account by hand, one at a time. The signed spec said plainly that this didn't scale, and set the goal as a system that runs without the owner or support lead manually reconciling Telegram and broker data.

The cost was bigger than staff hours. The owner earns rebates on every trade his referred clients place. A member who stops trading, or moves to another broker's network, is a direct revenue leak who also gets the signals for free. And the real member base turned out to be about 56,000, not the 12,000 in the brief, so the manual job was nearly five times bigger than anyone had assumed.

How a bot removes members from a paid Telegram channel automatically

Every reliable setup has the same four parts:

  1. A synced copy of your member data. The bot should never wait on your payment provider or broker. On Nexus, a sync engine logs into the Vantage partner portal every 20 minutes and pulls the whole IB network into our own database.
  2. A verification step at the door. The bot asks each applicant for their MT4/MT5 account number and checks it against the synced data. Because the check is local, it takes about 1.8 ms. The spec's target was 100 ms.
  3. A rules engine. After every sync, it decides for each member: leave alone, warn, or remove.
  4. A dashboard where the owner and support team see every decision and can override it.

The rules on Nexus: the account must sit under the client's IB or any sub-IB beneath it, the member must have traded within a set number of gold trading days, and the balance must stay above a minimum, with a warning and a grace period first. A member with several accounts passes if any one of them does.

Rules configuration
Rules configuration screen with the no-trade threshold in gold trading days, minimum balance, grace period and verification attempts
The owner changes the business rules himself, without a developer.

Your rules will differ. A course channel checks payment status, a community checks subscription renewals. The four parts stay the same.

Removing the wrong people is worse than removing nobody

A paying member kicked by mistake is angrier than a free rider who never gets caught. Every safeguard below exists because of that.

Start with a dry run, then audit it yourself

Nobody is removed until the owner has reviewed a list of who would be removed and why, and switched enforcement on. It was a signed requirement on Nexus.

The first full dry run in production, on 21 July, checked 2,428 verified members and flagged 749 for removal, about 31 percent. All 749 were flagged for not trading. 582 of them had not placed a trade in over a week, or ever, and 471 were also under the minimum balance.

Before the owner pressed the button, I audited that list independently. I rebuilt the preview logic against production and checked it against the live sync. 728 of the 749 were exactly right, on data minutes old. The multiple-accounts rule held perfectly: no flagged member had any account that had traded within the window.

The other 21 were being judged on four-day-old data. They had dropped out of the feed during our server migration, and 18 of them sat under just three sub-IBs. I flagged them by name before go-live.

Rules enforcement · dry run
Dry run screen listing which Telegram members would be removed and the rule behind each one, before anything happens
The dry run. Nobody is removed until the owner switches enforcement on.

The audit also showed how much the settings drive the list. At launch, the no-trade window was set to 2 gold trading days, which is strict. It was raised later. If you build one of these, start your thresholds loose and tighten them once you trust the data.

Expect go-live to surprise you

The preview said about 760 removals. When the owner switched enforcement on, the live run removed 1,349.

My first job was to prove whether the engine had misbehaved. It hadn't. Minutes after the preview, an entire sub-IB network had been moved off the owner's IB at the broker. The broker's feed dropped from about 50,800 clients to 26,200 in a single sync, and the engine correctly removed everyone who had left.

Correct, but too close for comfort. If that drop had been a broker glitch instead of a real move, the same logic would have removed thousands of people who should have stayed. So we built two safeguards:

  • A completeness guard that pauses "left the IB" removals whenever the feed shrinks suddenly and well below its normal size.
  • A consecutive-miss rule: someone must be missing for several syncs in a row before they're removed, not just one.

Tell the member exactly why

Before any removal, the member gets a private message naming the rule they failed: no trades, balance below minimum, or no longer under the IB. Support gets far fewer angry messages when people already know the reason.

On go-live day, members started complaining they had been removed "for low balance" without a warning. The rule itself was right: it had warned 191 people and removed nobody for balance. But the removal message template had been edited to say "low balance" for every reason. We paused enforcement within about 40 minutes and fixed the wording. A wrong reason is almost as bad as a wrong removal.

Make every action reversible

Every removal is logged with the rule behind it, and support can allow a rejoin in one click. Repeated wrong account numbers block the user, and support can clear that block in one click too. Channel admins are protected from removal entirely.

Kicked clients report
Removed members report showing the rule that removed each member, the date, the assigned IB and an allow-rejoin action
Every removal, the rule behind it, and a one-click allow-rejoin.

Staying inside Telegram's rate limits

Telegram limits how fast a bot can send messages and act on members. Bulk removals that ignore this get the bot restricted.

On Nexus, every approval, removal and message goes through a queue that stays inside the limits and survives restarts. That queue was tested hard in production. One night, a 7,000-person join rush froze the bot, because a single process was running the sync, the bot and a browser fallback, and every re-login under load stalled replies.

The same night, a database-only bot mode cleared the 2,150-message backlog in about 90 seconds. The permanent fix split the bot into its own service. Over the next 19 hours the sync engine re-logged 59 times under the same pressure, and the bot's backlog stayed at zero.

When your data source breaks

If your member data comes from a portal instead of an official API, plan for the day it changes. Vantage rebuilt its partner login page overnight, and every login failed.

A diagnostic tool saved the live page and ruled out an IP ban, the CAPTCHA, resources and the browser profile one at a time. Login now uses ordered fallback selectors tested offline against a saved copy. When it fails, the engine alerts us and stays up instead of crash-looping, and enforcement never acts on stale data while the sync is down.

What you need before building one

  • The bot as a channel admin, with join-request approval switched on.
  • A reliable source of truth for who should be in. This works with any payment or membership source: Stripe, PayPal, crypto payments, SSLCommerz, bKash, a broker portal, or your own database. I've worked with all of them.
  • Your rules written down, including warnings and grace periods. On Nexus the signed spec ran to 52 requirements.
  • A dry run plan, and someone to audit it before the first real removal.
  • A decision on who can override the bot, and how fast.

Want one for your channel?

If you run a paid Telegram channel and want removals automated safely, message me on WhatsApp. Tell me where your member data lives and what your rules are, and I'll tell you honestly what it takes. The full Project Nexus case study covers the dashboard, the sub-IB logins and the rest of the build.

Let's talk

Want a second opinion on your build?

Tell me what you're building, your timeline, and a rough budget, and I'll tell you honestly if I can help.

Thanks, your message is on its way. I'll reply within a day.
Shahria EmonCOO, Core Devs Ltd
WhatsAppFastest reply
Prefer email?
[email protected]
  • A reply within a day, from Dhaka (GMT+6)
  • An honest yes or no on whether I can help
  • 5/5 on Upwork with the Core Devs team
Next article
W-03
Spec-Driven Development on a Real Project: Rebuilding Scrumo's Core in 7 Days
8 min read