Groups and rule assignments

Group model, statuses, and assignment behavior.

The Groups page is where connected Telegram groups are managed and where per-group rule choices can be reviewed or changed.

Group Fields

Each group stores:

  • Telegram chat ID.
  • Telegram title.
  • Optional internal label.
  • Telegram username, if present.
  • Type: group, supergroup, or channel.
  • Status: active, paused, error, or disconnected.
  • Billing status: billable or non_billable.
  • Bot status and permissions.
  • Connected timestamp.
  • Last seen timestamp.

Current /connect supports groups and supergroups. Channel is present in the schema but not part of the normal connection flow.

Group Status

Active

The group is enabled. Moderation can run if the bot has the required permissions.

Paused

The group is disabled and non-billable. Rules should not be treated as actively operating for that group.

Error

The application marked the group as having a problem.

Disconnected

The group is no longer active in the account and is non-billable.

Billing Status

A group is billable only when it is active and billing status is billable.

Paused, disconnected, and billing-paused groups are non-billable.

Group Label

A label is an internal dashboard name. It does not change the Telegram group title.

Use labels to distinguish similarly named groups, for example:

Main EN community
Main RU community
VIP support group
Partner announcements

Rule Assignment Basics

A rule affects a group only if all of these are true:

  1. The group is connected and active.
  2. The rule or list is active/enabled.
  3. The rule or list is assigned to the group.
  4. The bot has the Telegram permission required for the action.

Assignment Counts

Rule pages display assignment state as a count.

Typical meanings:

  • Not assigned: no current groups use this rule.
  • All N groups: every current group is covered.
  • X of N groups: only some current groups use this rule.

One-Per-Group Rule Types

These rule types are one-per-group:

  • Link filter.
  • Rate limit.
  • Welcome message.

Assigning another rule of the same type to a group replaces the previous assignment.

List-Based Rule Types

These rule types use rule sets and items:

  • Stop words.
  • Required words.
  • Blocked users.

They can be assigned through rule-set assignment flows and group pages. Required words include conflict protection so a group does not receive multiple enabled required-word lists through normal assignment paths.

Group Sets

A group set is a saved collection of groups.

Use group sets to make bulk assignment easier, for example:

  • Public communities
  • VIP groups
  • Regional groups
  • Test groups

A group set has:

  • Title.
  • Description.
  • Enabled flag.
  • Members.

Group sets are assignment helpers. If a group set is disabled, runtime assignment resolution ignores it.

Runtime Cache

The bot uses an in-memory runtime cache for connected groups and effective rules. Rule changes trigger cache refresh asynchronously. There can be a short delay between saving a rule and seeing it applied in Telegram.