Layer 220
AccountDisablePeerConnectedBot
Permanently disconnect a specific chat from all business bots (equivalent to specifying it in recipients. exclude_users during initial configuration with account. update Connected Bot ); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking account. update Connected Bot.
method
Users
Parameters
| Name | Type | Description |
|---|---|---|
| Peer | InputPeer | The chat to disconnect |
Returns
BoolPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | BOT_ALREADY_DISABLED | The connected business bot was already disabled for the specified peer. |
| 400 | BOT_NOT_CONNECTED_YET | No business bot is connected to the currently logged in user. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
Gogram Example
// AccountDisablePeerConnectedBot - positional arguments result, err := client.AccountDisablePeerConnectedBot(&tg.InputPeerUser{UserID: int64(123456789)}) if err != nil { // handle error } // result is *tg.Bool