fix: 修复口令导致异常关闭的问题

This commit is contained in:
涵曦 2024-07-04 13:07:34 +00:00
parent 77a37a9438
commit 1b3ed3b35a

View File

@ -640,13 +640,13 @@ class XiaoMusic:
self.log.info("收到消息:%s 控制面板:%s", query, ctrl_panel) self.log.info("收到消息:%s 控制面板:%s", query, ctrl_panel)
# 匹配命令 # 匹配命令
try:
opvalue, oparg = self.match_cmd(query, ctrl_panel) opvalue, oparg = self.match_cmd(query, ctrl_panel)
if not opvalue: if not opvalue:
await asyncio.sleep(1) await asyncio.sleep(1)
await self.check_replay() await self.check_replay()
continue continue
try:
func = getattr(self, opvalue) func = getattr(self, opvalue)
await func(arg1=oparg) await func(arg1=oparg)
except Exception as e: except Exception as e: