Anti-spam

Live

Anti-spam overview

How text, link and forward filters interact, when automatic AI verification applies, and how it differs from manual /spam checks.

Why there are several filters

One promotional post can contain a repeated phrase, a link and a forward from a channel. Defendy checks these signals with different filters. Choose them according to the group's rules: prohibiting all links is a different policy from prohibiting advertising text.

Open Settings in your private chat with @defendy_bot, select the group and open Anti-spam. Its sections are Text, Links and Forwards. Use the separate Stop words section for your own phrases.

How the checks interact

The current ordinary-text chain checks links, text anti-spam, stop words and profanity in that order. Forwarded messages have a forward check before those text filters. The first matching filter stops the chain. Do not expect every module to assign an independent penalty or AI to reconsider every deletion.

Administrator messages and members with applicable immunity can skip this moderation. Test with an ordinary member without exceptions. Missing, disabled or invalid module settings do not become active protection simply because the bot has joined the group.

Text anti-spam

The implementation uses built-in text patterns and a local classifier. The screen offers Lenient, Standard and Strict levels, an action and its parameters, and optional AI verification.

The schema's initial values are enabled, Standard strictness, action None and deletion on. These are not evidence of your group's saved state: a missing module configuration does not participate in moderation. Check the actual settings.

The current Text screen has no dedicated deletion switch. Choosing None does not guarantee the message remains, and a warning can accompany deletion. Start in a test group. See Text anti-spam for the action controls.

Automatic AI verification within text anti-spam

This option is off by default. When enabled, it permits additional verification of eligible messages if the AI service is configured and available. Built-in pattern matches and confident local-model decisions do not necessarily reach AI.

The current automatic path has these boundaries:

  • The local-model score is at least 0.10 and below 0.80.
  • Text must contain at least 10 characters. Up to its first 300 characters and the group title are sent to the provider.
  • Trusted members skip this additional verification.
  • The saved newcomer restriction applies. New members only is not editable in the current form; Newbie period offers 3, 7, 14 or 30 days. Its clock uses Defendy’s first stored observation for this check, not the actual Telegram join time. An existing member without a record can also qualify.

If verification is inapplicable or AI returns no usable result, the configured local strictness threshold decides. This is not an automatic human-review queue. AI can make mistakes, and checked text is transmitted to an external provider. An implemented path does not establish that the provider is enabled in a particular deployment.

The manual command is a separate workflow

The manual /spam check is requested for a selected message and has its own settings and limits. Its switch does not enable automatic checking of every incoming message. Do not transfer assumptions between the two workflows.

The link filter is off by default. External and Telegram links have separate modes: Ignore, Blacklist and Delete. Review message deletion and the member action separately from the mode.

A whitelist is not an exemption from all anti-spam checks. Invitations, group quotes, popular sites, IP addresses and unclickable links have additional conditions. The control for allowing people mentions is currently disabled and marked as forthcoming. See link-filter settings.

Forwards

Settings are split across five source types: channel, group, user, bot and hidden user. Check the relevant type’s enabled state, deletion, action and exceptions. The visible media-filter and first-message-allowance switches currently do not change the filtering result. See forward filtering.

Test actual forwards from approved and prohibited sources. Copied text is not a forward, and a hidden author may not provide the identifier your intended exception needs.

A safe first setup

  1. Write down the prohibited behaviour and collect legitimate messages on the same subject.
  2. Configure one filter in a test group. Start with action None and account for possible deletion.
  3. Test as an ordinary member. Record the trigger reason, removal and penalty separately.
  4. Before enabling warnings, check thresholds and accumulated points. A warning can trigger the next restriction tier.
  5. Reopen the settings after saving. If logging is configured, compare its record with the actual outcome.

When legitimate text is removed, correct the specific rule and separately review any penalty already issued. When advertising remains, check bot permissions, exceptions, the saved module state and the action result. Enabling a filter does not rescan the whole history or guarantee nobody sees a message before removal.

For filter selection and a practical test plan, see automatic advertising removal. Reviewed against the current interface and implementation on 5 October 2026; no live test of your group is implied.

Need help?

If a setting behaves differently than expected, contact support.@ubotz