toggle_dialog_pin()¶
- async Client.toggle_dialog_pin()¶
Pin or unpin a dialog.
Usable by Users Bots- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.pinned (
bool, optional) – Pass True to pin, False to unpin. Defaults to True.folder_id (
int, optional) – Folder ID. Pass 0 for the main folder.
- Returns:
bool– True on success.
Example
await app.toggle_dialog_pin(chat_id, pinned=True)