toggle_join_request()¶
- async Client.toggle_join_request()¶
Toggle join requests (admin approval to join) on a channel or supergroup.
- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target channel or supergroup.enabled (
bool) – Whether join requests should be enabled.apply_to_invites (
bool, optional) – Whether this applies to invite links.guard_bot (
int|str, optional) – Bot responsible for handling join requests.
- Returns:
bool– True on success.
Example
# Enable join requests await app.toggle_join_request(chat_id, enabled=True)