更新bmcl插件,添加/brrs命令以显示排名信息

This commit is contained in:
shenjack 2024-02-22 23:36:54 +08:00
parent 1f7ffcb2d4
commit 3b280e23c0
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -178,7 +178,13 @@ def bmcl_rank(msg: NewMessage, client: IcaClient, name: Optional[str]) -> None:
help = """/bmcl -> dashboard
/bmcl rank -> all rank
/bmcl rank <name> -> rank of <name>"""
/bmcl rank <name> -> rank of <name>
/brrs <name> -> rank of <name>
搜索限制:
1- 3 显示全部信息
4-10 显示状态名称
11+ 不显示
"""
def on_message(msg: NewMessage, client: IcaClient) -> None:
@ -194,3 +200,11 @@ def on_message(msg: NewMessage, client: IcaClient) -> None:
else:
reply = msg.reply_with(help)
client.send_message(reply)
elif msg.content.startswith("/brrs"):
if msg.content == "/brrs":
reply = msg.reply_with(help)
client.send_message(reply)
else:
if len(msg.content) > 6:
name = msg.content[6:]
bmcl_rank(msg, client, name)