Telegram members and join requests
Permissions, bans, member details and joining a chat.
Before configuring¶
- Use the correct chat and member ID; a username is not a numeric user ID.
- Check the bot's own permissions.
- Check who requested an action before changing permissions or banning someone.
A user and a sender channel are different authors. A message sent as a channel requires sender-chat actions rather than user actions.
These blocks are for Telegram. Test them in a test group first.
Ban member¶
Bans a member from a chat.
- Set the chat and user ID. Configure a duration and message removal if needed.
- Check the ID and administrator permissions. Use Remove member for removal without a continuing entry ban.
Remove member¶
Removes a member without leaving a permanent re-entry ban.
- Set the chat and user ID.
- The person can return through an available entry method. Use Ban member to prohibit re-entry.
Unban member¶
Removes a member's ban.
- Set the chat and user ID. Check the only-if-banned setting.
- Unbanning permits a return; it does not automatically add the person back to the chat.
Restrict member¶
Changes one member's permissions, such as preventing them from sending messages.
- Set the chat, user, permissions and an optional restriction duration.
- This affects that member, not the whole chat. Use Set chat permissions for shared rules.
Promote administrator¶
Promotes a member to administrator with selected permissions.
- Set the chat, user and only the permissions they need.
- The bot must be allowed to appoint administrators. Do not grant permissions based on unchecked user input.
Demote administrator¶
Removes a member's administrator permissions.
- Set the chat and administrator's user ID.
- The bot cannot change every administrator: Telegram's permission hierarchy and restrictions apply.
Set administrator title¶
Changes the title displayed for an administrator.
- Set the chat, user and title text.
- The title does not change permissions. Grant permissions with a separate block.
Set member tag¶
Changes a member's tag in a chat.
- Set the chat, user and tag.
- Check tag support in the chat and the bot's permissions. This does not rename the Telegram account.
Ban sender channel¶
Bans a selected sender channel or chat from posting in the target chat.
- Set the target chat and sender chat ID.
- A sender channel ID is different from a user ID. Check who the message was sent as.
Unban sender channel¶
Lifts a posting ban on a selected sender channel or chat.
- Set the target chat and banned sender chat ID.
- Use Unban member to unblock an ordinary user.
Approve join request¶
Approves a user's request to join a chat.
- Supply the chat and user from the Join request event.
- Add a condition first if not every request should be accepted. The bot needs permission to handle join requests.
Decline join request¶
Declines a join request.
- Set the chat and user from the request.
- The rejection applies to this request. Use a separate block to ban the user.
Answer join request query¶
Answers a special join request query using its query ID.
- Supply chat_join_request_query_id and the response result.
- This ID is not a user ID. Use Approve join request for ordinary approval.
Send join request Web App¶
Sends a Web App in response to a special join request query.
- Set the query ID and app URL.
- Use data from a matching event. This is not an ordinary app button in a message.
Get member¶
Gets a member's details and status in a chat.
- Set the chat and user ID.
- Pass the result to a condition to check membership or role. Available data depends on the bot's permissions.
Get member boosts¶
Gets a selected user's boosts for a chat.
- Set the chat and user.
- Check the result before awarding a benefit. No boosts should be handled as a normal branch.