Actions13
Overview
This node integrates with the OneBot API to manage group-related operations in a chat platform. Specifically, for the "群组" (Group) resource and the "全员禁言" (Set Group Whole Ban) operation, it enables or disables a global mute setting for all members of a specified group. This is useful for group administrators or owners who want to temporarily prevent all members from sending messages, for example during announcements or important discussions.
Practical scenarios include:
- Temporarily muting all group members during an event or announcement.
- Quickly enabling or disabling group-wide message restrictions without removing individual permissions.
- Managing group behavior by controlling when members can speak.
Properties
| Name | Meaning |
|---|---|
| Group Name or ID | Select a group where you have management rights (group owner or admin). |
| Enable Ban | Boolean flag to enable (true) or disable (false) the global mute (whole ban) status. |
Output
The node outputs JSON data representing the response from the OneBot API after attempting to set the whole group ban status. The output includes success or error information related to the operation.
If the operation succeeds, the output JSON typically contains confirmation details from the API. If it fails, the output JSON includes an error field describing the failure reason and a success field set to false.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the OneBot API via an API key credential configured in n8n.
- The user must have appropriate administrative permissions in the target group (either as group owner or administrator).
- The node uses internal helper methods to fetch managed groups and verify permissions before executing the operation.
Troubleshooting
Common Issues:
- Attempting to set whole ban on a group where the bot does not have admin or owner privileges will fail.
- Providing an invalid or empty group ID will cause errors.
- Network or authentication issues with the OneBot API may prevent successful execution.
Error Messages:
"无法执行操作: set_group_whole_ban 需要管理员权限,当前机器人不是群 {group_id} 的管理员或群主"
Means the bot lacks sufficient permissions in the specified group. Ensure the bot is assigned as an admin or owner."执行操作 set_group_whole_ban 时出错: <error message>"
Indicates a failure during the API request; check network connectivity and API credentials."发送群消息需要有效的群ID,但未提供"
Indicates missing required group ID parameter; ensure the group is selected properly.
To resolve these, verify the bot's role in the group, confirm the group ID is correct, and check API credentials and connectivity.
Links and References
- OneBot API Documentation (general reference for API endpoints)
- n8n documentation on Creating Custom Nodes
- Chat platform/group management best practices (platform-specific)