toggle_community_peer_link()¶
- Client.toggle_community_peer_link()¶
Toggle a peer link in a community (show, hide, or remove).
Usable by Users Bots- Parameters:
community_id (
int|str) – The community channel.peer_id (
int|str) – The peer to toggle.visible (
bool, optional) – Pass True to make the peer visible in the community.hidden (
bool, optional) – Pass True to hide the peer in the community.deleted (
bool, optional) – Pass True to remove the peer from the community.
- Returns:
bool– True on success.- Raises:
PeerLinkNotModified – The peer is already in the requested state (e.g. already visible, already hidden, or already deleted).
ChatAdminRequired – The user is not an admin of the community.
Example
await app.toggle_community_peer_link(community_id, peer_id, visible=True)