🐛 Fix group_command

This commit is contained in:
CHxCOOH 2023-11-24 01:37:43 +08:00
parent 2bd8957e2c
commit f11baa685f

View File

@ -82,9 +82,10 @@ class SetCommandPlugin(Plugin):
BotCommand("update", "更新"),
]
await context.bot.set_my_commands(commands=group_command) # 留空default 为 botCommandScopeDefault, 所有聊天可见
await context.bot.set_my_commands(commands=user_command, scope=BotCommandScopeAllPrivateChats())
await context.bot.set_my_commands(commands=user_command + group_command, scope=BotCommandScopeAllPrivateChats())
if config.error.notification_chat_id:
await context.bot.set_my_commands(
commands=admin_command, scope=BotCommandScopeChat(config.error.notification_chat_id)
commands=admin_command + group_command + user_command,
scope=BotCommandScopeChat(config.error.notification_chat_id),
)
await message.reply_text("设置命令成功")