use lower

This commit is contained in:
shenjack 2024-05-27 20:35:47 +08:00
parent 2675ada851
commit 4669b6a378
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -225,7 +225,7 @@ def bmcl_rank(msg: IcaNewMessage, client: IcaClient, name: str) -> None:
r['index'] = i r['index'] = i
# 搜索是否有这个名字的节点 # 搜索是否有这个名字的节点
names: List[str] = [r["name"].lower() for r in rank_data] names: List[str] = [r["name"].lower() for r in rank_data]
finds = [name in n for n in names] finds = [name.lower() in n for n in names]
if not any(finds): if not any(finds):
reply = msg.reply_with(f"未找到名为{name}的节点") reply = msg.reply_with(f"未找到名为{name}的节点")
client.send_message(reply) client.send_message(reply)