Restrict chat member
The telegram_bot_api-restrict-chat-member tool enables administrators to restrict user permissions within supergroups on Telegram. This powerful method allows precise control over what members can post, helping maintain group order and enforce rules.
Features
- Restrict a user in any Telegram supergroup by specifying chat and user ID.
- Set timed restrictions with an 'until_date' Unix timestamp for automatic lifting.
- Control sending permissions including text, media, animations, and inline bots.
- Option to enable or disable web page previews in user messages.
- Supports fine-grained permission settings to customize user capabilities individually.
Benefits
- Maintains discipline and order by controlling disruptive members.
- Automates temporary restrictions to ease moderation workload.
- Enhances group security by limiting spam and inappropriate content.
- Improves user experience by customizing member permissions to fit group needs.
- Simplifies Telegram group management with an easy-to-use API integration.
Description
Use this method to restrict a user in a supergroup. See the docs for more information
Parameters
7 parameters
| Name | Type | Description |
|---|---|---|
| chatIdrequired | string | Enter the unique identifier for the target chat (e.g. |
| userId | string | Enter the unique identifier of the target user. |
| until_date | string | Enter the date when the restrictions will be lifted for the user, in unix time (e.g. |
| can_send_messages | boolean | Pass True, if the user can send text messages, contacts, locations and venues. |
| can_send_media_messages | boolean | Pass True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages. |
| can_send_other_messages | boolean | Pass True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages. |
| can_add_web_page_previews | boolean | Pass True, if the user may add web page previews to their messages, implies can_send_media_messages. |