01

A problem you only see from the inside

City flea markets on Telegram are lively places. People sell furniture, look for housing, offer services. But spam comes with them: links disguised as listings, financial schemes, copies of the same offer across dozens of groups

I ran several such groups and saw how quickly manual moderation becomes impossible. It also became clear that this is a shared problem across the whole network. That's how Telegram Moderator appeared, first for myself, then for other admins

02

Why stop words are not enough

Spammers adapt fast. They swap Cyrillic letters for similar Latin or Greek ones, reorder words, use synonyms. A list of banned words goes stale in a day or two

The Moderator engine works differently: a normalizer first converts all substituted characters to their standard form, and only then applies the rules: keywords, regular expressions, link checks, duplicate and flood analysis. Each factor adds a risk score, and the final sum determines the decision

03

Tuning for each group

Different groups, different context. In a Tbilisi flea market it's normal to post links to shops, while in a Moscow one it isn't. So each group has its own thresholds: one risk level means deleting the message, another a temporary restriction, a third a ban

New groups are connected in observation mode: the bot logs all triggers but takes no actions. This lets me calibrate the rules on the real stream before switching to live enforcement

04

Sandbox and the adaptation cycle

The most valuable part of the system is not the set of rules but the speed of reaction to new schemes. When a new type of spam appears, I log it in the journal, create a rule, test it in the sandbox against a corpus of real messages, and release it. The cycle takes minutes, not days

Over its lifetime, the journal has accumulated about 4,100 entries and roughly 1,300 “ban” decisions. It's a living base for training the rules and understanding how the nature of attacks changes

Related case

Telegram Moderator

Open case