Skip to content

toggleSupergroupJoinByRequest

Function · TDLib 1.8.67 · d1085f9c

Toggles whether all users directly joining the supergroup need to be approved by supergroup administrators; requires can_restrict_members administrator right

toggleSupergroupJoinByRequest(
  supergroup_id: int53,
  join_by_request: Bool,
  guard_bot_user_id: int53,
  apply_to_invite_links: Bool
) → Ok

supergroup_id

int53

Identifier of the supergroup that isn't a broadcast group and isn't a channel direct message group

join_by_request

Bool

New value of join_by_request

guard_bot_user_id

int53

Identifier of the bot which will be the guard bot in the group; pass 0 if none; ignored if join_by_request == false. The bot must have administrator privileges and can_invite_users right in the supergroup chat, and must have userTypeBot.is_guard == true

Bool

Pass true to apply the change to the existing invite links, including primary links