Mass actions ban or mute a Telegram user across active groups in the same account.
Available Actions
Current action types:
- Ban:
/banall - Mute:
/muteall
Where to Run Commands
Run mass-action commands inside a connected Telegram group.
The group must belong to the account where the action should run.
Required Role
The sender must have an account role that can run moderation operations:
owneradminmanager
Required Bot Permission
In each target group, the bot needs:
- Admin status.
- Restrict members permission.
Groups missing the permission are skipped with skipped_no_permission.
Target Selection
The current reliable workflow is to reply to a user's message.
Example:
Reply to the target user's message with:
/banall
or:
Reply to the target user's message with:
/muteall
The group help text mentions /banall <user or reply> and /muteall <user or reply>, but the implemented failure message asks users to reply to a user's message. Use reply mode for operational reliability.
Safety Checks
The bot rejects mass actions when:
- The source group is not connected.
- The sender is not known to GramGroupsBot.
- The sender has no account access.
- The sender role is not allowed.
- The command is not a reply to a detectable user.
- The target user cannot be detected.
- The target is the sender.
- The target is a bot.
Execution Scope
A mass action runs across all groups in the account.
For each group:
- Active groups with required permissions are processed.
- Inactive groups are skipped with
skipped_not_active. - Groups where the bot cannot restrict members are skipped with
skipped_no_permission. - Telegram API failures are stored as
failedresults.
Mute Duration
Current mute action restricts the target for 24 hours.
Execution Model
Mass actions are queued and executed asynchronously with bounded concurrency.
Default max concurrency is 3 groups at a time.
The bot replies in the source group:
Mass action queued. I will apply it to eligible groups.
Dashboard Review
Dashboard path:
/mass-actions
The Mass Actions page shows recent actions and per-group results.
Action statuses:
queuedrunningcompletedcompleted_with_errorsfailed
Per-group result statuses:
successskipped_no_permissionskipped_not_activefailed
Example Workflow
- A spammer posts in one connected group.
- An operator replies to that spammer's message with
/banall. - The bot queues the action.
- Eligible active groups receive a ban request for that Telegram user ID.
- The operator checks
/mass-actionsfor skipped or failed groups. - If many groups were skipped for permissions, fix bot permissions and rerun if needed.