account.disablePeerConnectedBot
Permanently disconnect a specific chat from all business bots » (equivalent to specifying it in recipients.exclude_users during initial configuration with account updateConnectedBot »); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking account.updateConnectedBot ».
func (c *Client) AccountDisablePeerConnectedBot(ctx context.Context, peer InputPeerClass) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountDisablePeerConnectedBot(ctx, peer)
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | The chat to disconnect |
Returns
bool
Possible 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. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.disablePeerConnectedBot#5e437ed9