From 29b4598e5fe1edde5a734d4c3ded708beb9f6103 Mon Sep 17 00:00:00 2001 From: XuChenXu <91937041+ChenXu233@users.noreply.github.com> Date: Mon, 25 Nov 2024 21:02:04 +0800 Subject: [PATCH] =?UTF-8?q?:lipstick:=20=E4=BA=BA=E6=80=A7=E5=8C=96?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot_plugin_dialectlist/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nonebot_plugin_dialectlist/__init__.py b/nonebot_plugin_dialectlist/__init__.py index 0939d0a..e1996c6 100644 --- a/nonebot_plugin_dialectlist/__init__.py +++ b/nonebot_plugin_dialectlist/__init__.py @@ -133,8 +133,10 @@ async def handle_b_cmd( ) d = msg_counter(messages, keywords) rank = got_rank(d) + if not rank: + await b_cmd.finish(f"该用户在群{gid}关于{keyword}的B话数量为0。") - await saa.Text(f"该用户在群{gid}的B话数量为{rank[0][1]}。").send(reply=True) + await saa.Text(f"该用户在群{gid}关于{keyword}的B话数量为{rank[0][1]}。").send(reply=True) rank_cmd = on_alconna(