Layer 220
method Users Business
account.updateConnectedBot#66a08c7e flags:# deleted:flags.1?true rights:flags.0?BusinessBotRights bot:InputUser recipients:InputBusinessBotRecipients = Updates;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
Deleted flags.1?true Whether to fully disconnect the bot from the current account.
Rights flags.0?BusinessBotRights Business bot rights.
Bot InputUser The bot to connect or disconnect
Recipients InputBusinessBotRecipients Configuration for the business connection

Returns

Updates

Possible Errors

Code Type Description
400 BOT_BUSINESS_MISSING The specified bot is not a business bot (the user. bot_business flag is not set).
400 BUSINESS_RECIPIENTS_EMPTY You didn't set any flag in input Business Bot Recipients, thus the bot cannot work with any peer.
403 PREMIUM_ACCOUNT_REQUIRED A premium account is required to execute this action.

Gogram Example

// AccountUpdateConnectedBot - using Params struct
result, err := client.AccountUpdateConnectedBot(&tg.AccountUpdateConnectedBotParams{
    Bot: &tg.InputUserSelf{},
    Recipients: &tg.InputBusinessBotRecipients{},

    // Optional fields:
    // Deleted: true,
    // Rights: &tg.BusinessBotRights{},
})
if err != nil {
    // handle error
}
// result is *tg.Updates