From 7efe47646576937acd2c8d7293158b44f465066a Mon Sep 17 00:00:00 2001 From: SALTWOOD <105980161+SALTWOOD@users.noreply.github.com> Date: Sun, 5 Jan 2025 16:33:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9F=A5=E8=AF=A2=20ID=20=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- salty_qq_chat/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salty_qq_chat/__init__.py b/salty_qq_chat/__init__.py index 8edd5ba..a1d8d62 100755 --- a/salty_qq_chat/__init__.py +++ b/salty_qq_chat/__init__.py @@ -525,9 +525,9 @@ def qq_command_bind_query(server: PluginServerInterface, event: MessageEvent, co case "ID": result = None if value in bindings.values(): - result = [k for k, v in bindings if v == value] + result = [k for k, v in bindings.items() if v == value] - if isinstance(result, List[str]): + if result is not None: reply( event, f"[CQ:at,qq={event.user_id}] 查询到如下结果:\n{'\n'.join(map(str, [f'QQ: {key} 绑定的是 \"{value}\"' for key in result]))}"