From 2675ada851b41ce0125a3f60d3e209788662bc8e Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Mon, 27 May 2024 20:31:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=20in=20=E6=9B=BF=E6=8D=A2=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ica-rs/plugins/bmcl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ica-rs/plugins/bmcl.py b/ica-rs/plugins/bmcl.py index 211b342..f873815 100644 --- a/ica-rs/plugins/bmcl.py +++ b/ica-rs/plugins/bmcl.py @@ -225,7 +225,7 @@ def bmcl_rank(msg: IcaNewMessage, client: IcaClient, name: str) -> None: r['index'] = i # 搜索是否有这个名字的节点 names: List[str] = [r["name"].lower() for r in rank_data] - finds = [n.find(name) != -1 for n in names] + finds = [name in n for n in names] if not any(finds): reply = msg.reply_with(f"未找到名为{name}的节点") client.send_message(reply)