toggle_community_collapsed()

Client.toggle_community_collapsed()

Toggle whether a community is collapsed in the dialogs list.

Usable by Users Bots
Parameters:
  • community_id (int | str) – The community channel.

  • collapsed (bool, optional) – Pass True to collapse, False to expand.

Returns:

Updates – On success.

Raises:

ChatAdminRequired – The user is not an admin of the community.

Example

await app.toggle_community_collapsed(community_id, collapsed=True)