From e843d790b1f01656772a2e26f8f299af6d41aba8 Mon Sep 17 00:00:00 2001 From: snowy Date: Mon, 13 May 2024 19:37:10 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20message=20=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/usage/extra_command.md | 4 ++-- liteyuki/plugins/liteyuki_statistics/stat_matchers.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/usage/extra_command.md b/docs/usage/extra_command.md index 23119ec6..13ce202b 100644 --- a/docs/usage/extra_command.md +++ b/docs/usage/extra_command.md @@ -39,7 +39,7 @@ bind-city|绑定城市 命令 ```shell -statistics message --duration --period --group [current|group_id] --bot [current|bot_id] # 统计Bot接收到的消息 +statistic message --duration --period --group [current|group_id] --bot [current|bot_id] # 统计Bot接收到的消息 # duration: 统计时长,支持格式例如:1d2h3m4s # period: 统计周期,支持格式同上 # group: 统计群组,支持current(当前群聊)和group_id @@ -49,7 +49,7 @@ statistics message --duration --period --group [current|grou 命令别名 ```shell -statistics|stat +statistic|stat message|m --duration|-d --period|-p diff --git a/liteyuki/plugins/liteyuki_statistics/stat_matchers.py b/liteyuki/plugins/liteyuki_statistics/stat_matchers.py index 07aa7c6b..cbe87b72 100644 --- a/liteyuki/plugins/liteyuki_statistics/stat_matchers.py +++ b/liteyuki/plugins/liteyuki_statistics/stat_matchers.py @@ -10,7 +10,7 @@ from nonebot_plugin_alconna import UniMessage, on_alconna, Alconna, Args, Subcom stat_msg = on_alconna( Alconna( - "statistics", + "statistic", Subcommand( "message", # Args["duration", str, "2d"]["period", str, "60s"], # 默认为1天 @@ -62,7 +62,7 @@ async def _(result: Arparma, event: T_MessageEvent, bot: Bot): if group_id in ["all", "a"]: group_id = "all" - if bot_id == ["current", "c"]: + if bot_id in ["current", "c"]: bot_id = str(bot.self_id) img = await get_stat_msg_image(duration, period, group_id, bot_id, ulang)