UpdateBotCommands

class pyrogram.raw.types.UpdateBotCommands

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

Constructor of Update.

Details:
  • Layer: 227

  • 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
├── peer → Peer
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
├── bot_id → long
└── commands → Vector < BotCommand >
└── BotCommand
├── command → string
└── description → string

Example

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