Actions32
- Bot Actions
- Callback Actions
- Chat Actions
- File Actions
- Message Actions
- Payment Actions
- Sticker Actions
Overview
The "Ban Chat Member" operation in the BaleMessenger node allows you to ban a specific user from a chat by their user ID. This action restricts the banned user from participating in the chat, which is useful for moderating groups or channels to prevent spam, abuse, or unwanted behavior.
Common scenarios include:
- Moderators removing disruptive members from group chats.
- Automatically banning users based on certain triggers or rules.
- Managing membership in channels or supergroups.
Example: If a user repeatedly posts inappropriate content, this node can be used to ban that user from the chat to maintain a healthy community environment.
Properties
| Name | Meaning |
|---|---|
| Chat ID | Unique identifier for the target chat where the member will be banned. |
| UserId | The unique numeric identifier of the user to ban from the chat. |
Output
The output JSON contains a single field:
banned: A boolean indicating whether the ban operation was successful (true) or not (false).
Example output:
{
"banned": true
}
No binary data is produced by this operation.
Dependencies
- Requires an API authentication token credential for Bale Messenger.
- Uses the Bale Messenger Bot API endpoint at
https://tapi.bale.ai/bot. - The node depends on the official Telegram Bot API client adapted for Bale Messenger.
Troubleshooting
- Invalid Chat ID or User ID: Ensure that the provided chat and user identifiers are correct and that the bot has permission to ban members in the specified chat.
- Insufficient Permissions: The bot must have administrative rights with ban permissions in the chat; otherwise, the operation will fail.
- API Errors: Network issues or invalid credentials may cause errors. Verify the API token and network connectivity.
- Error Messages: The node may return error details in the output if the ban fails, including messages from the Bale Messenger API. Review these messages to identify issues such as "user not found" or "bot lacks rights."
Links and References
- Bale Messenger Bot API Documentation (general reference for API methods)
- Telegram Bot API - BanChatMember method (similar concept for understanding parameters and behavior)