mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 12:41:05 +08:00
用 in 替换掉
This commit is contained in:
parent
bda8a64f2b
commit
2675ada851
|
@ -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 = [n.find(name) != -1 for n in names]
|
finds = [name 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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user