account.UpdateConnectedBot

class pyrogram.raw.functions.account.UpdateConnectedBot

Connect a business bot » to the current account, or to change the current connection settings.

Details:
  • Layer: 223

  • ID: 66A08C7E

Parameters:
  • bot (InputUser) – The bot to connect or disconnect

  • recipients (InputBusinessBotRecipients) – Configuration for the business connection

  • deleted (bool, optional) – Whether to fully disconnect the bot from the current account.

  • rights (BusinessBotRights, optional) – Business bot rights.

Returns:

Updates

TL Schema

account.updateConnectedBot#66a08c7e
flags:#
deleted:flags.1?true
rights:flags.0?BusinessBotRights
bot:InputUser
recipients:InputBusinessBotRecipients

= Updates

Parameter Tree

UpdateConnectedBot
├── deletedtrue (optional)
├── rightsBusinessBotRights (optional)
│ └── BusinessBotRights
│ ├── replytrue (optional)
│ ├── read_messagestrue (optional)
│ ├── delete_sent_messagestrue (optional)
│ ├── delete_received_messagestrue (optional)
│ ├── edit_nametrue (optional)
│ ├── edit_biotrue (optional)
│ ├── edit_profile_phototrue (optional)
│ ├── edit_usernametrue (optional)
│ ├── view_giftstrue (optional)
│ ├── sell_giftstrue (optional)
│ ├── change_gift_settingstrue (optional)
│ ├── transfer_and_upgrade_giftstrue (optional)
│ ├── transfer_starstrue (optional)
│ └── manage_storiestrue (optional)
├── botInputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
└── recipientsInputBusinessBotRecipients
├── existing_chatstrue (optional)
├── new_chatstrue (optional)
├── contactstrue (optional)
├── non_contactstrue (optional)
├── exclude_selectedtrue (optional)
├── usersVector < InputUser > (optional)
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
└── exclude_usersVector < InputUser > (optional)
├── InputUserEmpty
├── InputUserSelf
├── InputUser
│ ├── user_idlong
│ └── access_hashlong
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
├── msg_idint
└── user_idlong

Example

await app.invoke(
    UpdateConnectedBot(
        deleted=None,
        rights=BusinessBotRights(
            reply=None,
            read_messages=None,
            delete_sent_messages=None,
            delete_received_messages=None,
            edit_name=None,
            edit_bio=None,
            edit_profile_photo=None,
            edit_username=None,
            view_gifts=None,
            sell_gifts=None,
            change_gift_settings=None,
            transfer_and_upgrade_gifts=None,
            transfer_stars=None,
            manage_stories=None
        ),
        bot=await app.resolve_user(chat_id),
        recipients=InputBusinessBotRecipients(
            existing_chats=None,
            new_chats=None,
            contacts=None,
            non_contacts=None,
            exclude_selected=None,
            users=None,
            exclude_users=None
        ),
    )
)