Layer 227
MessagesToggleDialogPin
Pin/unpin a dialog
method
Users
messages.toggleDialogPin#a731e257 flags:# pinned:flags.0?true peer:InputDialogPeer = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| Pinned | flags .0? true | Whether to pin or unpin the dialog |
| Peer | InputDialogPeer | The dialog to pin |
Returns
BoolGogram Example
// MessagesToggleDialogPin - positional arguments result, err := client.MessagesToggleDialogPin(nil, &tg.InputDialogPeer{}) if err != nil { // handle error } // result is *tg.Bool
Possible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | PEER_HISTORY_EMPTY | You can't pin an empty chat with a user. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | PINNED_DIALOGS_TOO_MUCH | Too many pinned dialogs. |