bots.SetBotCommands

class pyrogram.raw.functions.bots.SetBotCommands

Set bot command list

Details:
  • Layer: 223

  • ID: 517165A

Parameters:
Returns:

bool

TL Schema

bots.setBotCommands#517165a
scope:BotCommandScope
lang_code:string
commands:Vector<BotCommand>

= Bool

Parameter Tree

SetBotCommands
├── scopeBotCommandScope
│ ├── BotCommandScopeUsers
│ ├── BotCommandScopeChats
│ ├── BotCommandScopePeer
│ │ └── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ │ └── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ └── user_idInputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ └── InputUserFromMessage
├── lang_codestring
└── commandsVector < BotCommand >
└── BotCommand
├── commandstring
└── descriptionstring

Example

await app.invoke(
    SetBotCommands(
        scope=BotCommandScopeDefault(),
        lang_code="text",
        commands=[
                BotCommand(
                    command="text",
                    description="text"
                )
            ],
    )
)