From 1b3ed3b35a32c69c15591ba27bb26d68eea4ecbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Thu, 4 Jul 2024 13:07:34 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=A3=E4=BB=A4?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=BC=82=E5=B8=B8=E5=85=B3=E9=97=AD=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaomusic/xiaomusic.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xiaomusic/xiaomusic.py b/xiaomusic/xiaomusic.py index 63da384..214e1d9 100644 --- a/xiaomusic/xiaomusic.py +++ b/xiaomusic/xiaomusic.py @@ -640,13 +640,13 @@ class XiaoMusic: self.log.info("收到消息:%s 控制面板:%s", query, ctrl_panel) # 匹配命令 - opvalue, oparg = self.match_cmd(query, ctrl_panel) - if not opvalue: - await asyncio.sleep(1) - await self.check_replay() - continue - try: + opvalue, oparg = self.match_cmd(query, ctrl_panel) + if not opvalue: + await asyncio.sleep(1) + await self.check_replay() + continue + func = getattr(self, opvalue) await func(arg1=oparg) except Exception as e: