UpdateBotCommands

class pyrogram.raw.types.UpdateBotCommands

The command set of a certain bot in a certain chat has changed.

Constructor of Update.

Details:
  • Layer: 223

  • ID: 4D712F2E

Parameters:
  • peer (Peer) – The affected chat

  • bot_id (int 64-bit) – ID of the bot that changed its command set

  • commands (List of BotCommand) – New bot commands

TL Schema

updateBotCommands#4d712f2e
peer:Peer
bot_id:long
commands:Vector<BotCommand>

= Update

Parameter Tree

UpdateBotCommands
├── peerPeer
│ ├── PeerUser
│ │ └── user_idlong
│ ├── PeerChat
│ │ └── chat_idlong
│ └── PeerChannel
│ └── channel_idlong
├── bot_idlong
└── commandsVector < BotCommand >
└── BotCommand
├── commandstring
└── descriptionstring

Example

UpdateBotCommands(
    peer=PeerUser(user_id=0),
    bot_id=0,
    commands=[
            BotCommand(
                command="text",
                description="text"
            )
        ],
)