🎨 Update Bot Command

This commit is contained in:
洛水居室 2023-12-16 16:48:03 +08:00
parent 4c2133180b
commit 5c3a444a6c
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -82,6 +82,7 @@ class SetCommandPlugin(Plugin):
BotCommand("send_log", "发送日志"), BotCommand("send_log", "发送日志"),
BotCommand("update", "更新"), BotCommand("update", "更新"),
BotCommand("set_command", "重设命令"), BotCommand("set_command", "重设命令"),
BotCommand("status", "当前Bot运行状态"),
] ]
await context.bot.set_my_commands(commands=group_command) # 留空default 为 botCommandScopeDefault, 所有聊天可见 await context.bot.set_my_commands(commands=group_command) # 留空default 为 botCommandScopeDefault, 所有聊天可见
await context.bot.set_my_commands(commands=user_command + group_command, scope=BotCommandScopeAllPrivateChats()) await context.bot.set_my_commands(commands=user_command + group_command, scope=BotCommandScopeAllPrivateChats())