bots.SetBotCommands
- class pyrogram.raw.functions.bots.SetBotCommands
Set bot command list
- Details:
Layer:
223ID:
517165A
- Parameters:
scope (
BotCommandScope) – Command scopelang_code (
str) – Language codecommands (List of
BotCommand) – Bot commands
- Returns:
bool
TL Schema
bots.setBotCommands#517165a
scope:BotCommandScope
lang_code:string
commands:Vector<BotCommand>
= Bool
Parameter Tree
SetBotCommands
├── scope →
BotCommandScope│ ├──
BotCommandScopeDefault│ ├──
BotCommandScopeUsers│ ├──
BotCommandScopeChats│ ├──
BotCommandScopePeer│ │ └── peer →
InputPeer│ │ ├──
InputPeerEmpty│ │ ├──
InputPeerSelf│ │ ├──
InputPeerChat│ │ ├──
InputPeerUser│ │ ├──
InputPeerChannel│ │ ├──
InputPeerUserFromMessage│ │ └──
InputPeerChannelFromMessage│ │ └── peer →
InputPeer│ │ ├──
InputPeerEmpty│ │ ├──
InputPeerSelf│ │ ├──
InputPeerChat│ │ ├──
InputPeerUser│ │ ├──
InputPeerChannel│ │ ├──
InputPeerUserFromMessage│ │ └──
InputPeerChannelFromMessage│ └──
BotCommandScopePeerUser│ ├── peer →
InputPeer│ │ ├──
InputPeerEmpty│ │ ├──
InputPeerSelf│ │ ├──
InputPeerChat│ │ ├──
InputPeerUser│ │ ├──
InputPeerChannel│ │ ├──
InputPeerUserFromMessage│ │ └──
InputPeerChannelFromMessage│ └── user_id →
InputUser│ ├──
InputUserEmpty│ ├──
InputUserSelf│ ├──
InputUser│ └──
InputUserFromMessage├── lang_code →
string└── commands →
Vector < BotCommand >└──
BotCommand├── command →
string└── description →
stringExample
await app.invoke(
SetBotCommands(
scope=BotCommandScopeDefault(),
lang_code="text",
commands=[
BotCommand(
command="text",
description="text"
)
],
)
)