Message filtering

AximoBot drops posts before they reach your Telegram chat by stop words, required words, regular expressions, length and media type. How to set the rules, and how to import and export them.

Open @AximoBot

HomeChatMessage Filtering
HomeChatList of SourcesSourceMessage Filtering

Message Filtering decides which posts are not delivered: a post with a stop word, without any of the required words, or without text or media can be dropped before it reaches the chat. It exists for the chat and for every source; a source can either override the chat's filters or add to them (the Mode switch at the top of the source section — Replace or Add to, see Managing sources).

The blocks of the screen, top to bottom:

  • Filter by Content and Keyword filter — on this page;
  • Similarity Filter — drops look-alike posts, chat only;
  • Time filter — Time filter;
  • Chat for filtered messages: Chat for filtered messages, chat only;
  • Filtered posts history: source only, opens the source history already narrowed to filtered posts.

Publishing by views, likes, reactions, comments and reposts is a separate source section: Delayed filters.

Filtering by meaning — ads, off-topic posts — is done by the model: see AI filters. Filtered posts show up in the events log with the reason.

Filter by content

Quick switches that drop whole classes of posts:

  • Messages without text: the post has no letter or digit at all. Emoji, hashtags, @-mentions and links do not count as text, so a post of just emoji and hashtags is dropped too. The title does not count if Remove title is on in replacements with the basic template: it would not make it into the post anyway. The check runs again after replacements and after AI: if replacements or the model left nothing of the text, the post does not go out.
  • Messages without images/photos.
  • Messages without videos.
  • Messages without any media. This also catches posts from public Telegram channels whose media the bot could not fetch: such a post is not sent as plain text but dropped with the reason "No media attached".
  • Messages with links: a post with a link or with buttons does not get through. More below.
  • Minimum characters: posts shorter than this number are dropped (0 = no limit).

Messages with links is a quick way to cut ads: the bot looks for a link in the title, the text and the text of a quoted post, including a link hidden under a word ("read more here"). A post with buttons under it is dropped too. The check runs once, right after the post arrives, on the original text: a link added by replacements or by the model is not seen by this switch. If a source puts a link into every post itself (say, "Read more" in an RSS feed), the switch drops all of its posts; check the delivery log, where such posts show the reason "Link in the post".

The minimum-length switch has a second step: once the number is above zero, the mini app asks at which stage to measure the length — the original text, the text after replacements, or after AI processing.

Keyword filter

HomeChatMessage FilteringFilter rules

In the Keyword filter block, the Filter rules row opens the rule editor. Two kinds of rule:

  • Required words — the post is forwarded only if it contains at least one of them. Use them to follow one topic in a busy source.
  • Stop words — a post containing any of them is never forwarded.

Adding a rule, step by step:

Each rule has options:

  • Exact match — case-sensitive.
  • Separate word — matches a whole word, so art does not match start, and also its other forms (cases, plural): market matches markets. When the rule is one short word (up to 4 letters or digits) and this switch is off, an orange ⚠ icon appears in the field: a short word also matches inside other words ("ill" in "will"). Tap the icon — Turn on "Separate word" switches it on in one tap.
  • Regular expression — the pattern is a JavaScript regular expression, for example \b(BTC|ETH)\b or price[:\s]+\d+. Turning it on reveals a test box right under the field: paste a sample post and every match is highlighted, with a count underneath. The test box runs the pattern exactly as delivery does — case-insensitive, in Unicode mode (so \p{L} works), no g or m, so ^/$ mean the start/end of the whole text. The ? button next to the field opens a cheat sheet of common patterns (., \d, \w, \b, [abc], …) — tap one to insert it. Note that \w and \b only recognize Latin letters, so they miss Cyrillic text; use [а-яёA-Za-z0-9_] or \p{L} instead.
  • When to apply filters: Original (right after reception, on the source text), Replaced — on the text after replacements, or After AI — after the model has processed it. Choose the stage the words are guaranteed to be in; where these stages sit on a post's path — see A post's path. The "After AI" stage also catches markers the model appends — that is how AI filters work.

Rules are checked in order; a post must pass every stop rule and at least one required rule (if any required rules exist).

How the rules screen works:

  • A legend at the top of the card explains the icons — only the ones your rules actually use: stop word, required word, exact match, whole word, regular expression, and the "after replacements" and "after AI" stages.
  • 10 rules per page — with more, page numbers appear under the list.
  • Tap a rule to change it: the row turns into the same form with Cancel and Save.
  • Add a rule under the list opens the add form; while there are no rules, the card says "No rules yet" and shows the same button. Opening the form closes a rule edit in progress without saving, and the other way round.
  • A list in one go: type several words separated by commas, semicolons or line breaks and the form offers Split into N rules. Before saving it shows the rules it will create (remove any you don't need), all with the same options; Keep as one line saves the input as a single rule. An old list rule is marked with ⚠ in the legend.

Import and export of rules

At the bottom of "Filter rules" — Download rules and Load from file. Rules are exported as a plain text file: easy to edit in a text editor and move to another chat or source. One line is one rule:

LineMeaning
[-] adsstop word: a post with it does not pass
[+] Nikolaevrequired: a post passes only if it contains it
[-] Sochi @wordwhole word only: "Sochi", but not "Sochinenie"
[-] BMW @exactexact match: case-sensitive
/bu(y|ying)/iregular expression — in slashes, flags after
[-] promo @after_aiwhen to check: @before_replacements (default), @after_replacements, @after_ai
#! [-] pausethe rule is imported switched off
# notecomment, skipped on import

In the mini app this table opens from the File format row, and Sample file shows such a template in full. On load the mini app first shows how many rules it found in the file and asks what to do: Add to existing or Replace all; rules you already have are not duplicated, lines it cannot read are skipped with their line number.

FAQ

How do I stop posts with certain words from reaching my Telegram channel? Open Message Filtering → Filter rules and add the words as stop words: a post containing any of them is never forwarded. Turn on Separate word so that a short word does not match inside longer ones.

How do I forward only the posts about one topic? Add required words: a post is forwarded only if it contains at least one of them. A post must also pass every stop rule.

Can I filter with regular expressions? Yes. Turn on Regular expression in a rule and write a JavaScript pattern; it runs case-insensitive and in Unicode mode. \w and \b only recognize Latin letters, so for Cyrillic use \p{L} or [а-яёA-Za-z0-9_].

Can I filter out ads or off-topic posts by meaning? Yes, with the model: a prompt marks such a post and a filter rule at the After AI stage drops it. See AI filters.

Where do I see why a post was filtered? Filtered posts show up in the events log with the reason. They can also be collected in a chat for filtered messages.

Add your first source now

Open the bot, paste a link, pick a chat. The first posts arrive within minutes.

Open @AximoBot