toggle_join_to_send()

async Client.toggle_join_to_send()

Toggle whether users must join before sending messages.

Usable by Users Bots
Parameters:
  • enabled (bool, *optional*) – Whether join-to-send is enabled

  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat.

Returns:

Message

Example

await app.toggle_join_to_send(chat_id, ...)