diff --git a/liteyuki/plugins/liteyuki_pacman/npm.py b/liteyuki/plugins/liteyuki_pacman/npm.py index 2b2a1af..7a94c5a 100644 --- a/liteyuki/plugins/liteyuki_pacman/npm.py +++ b/liteyuki/plugins/liteyuki_pacman/npm.py @@ -480,8 +480,8 @@ async def _(result: Arparma, matcher: Matcher, event: T_MessageEvent, bot: T_Bot (mdc.link(store_plugin.author, f"https://github.com/{store_plugin.author}") if store_plugin.author else "Unknown")), mdc.quote(mdc.bold(ulang.get("npm.description")) + " " + mdc.paragraph(max(loaded_plugin.metadata.description, store_plugin.desc))), mdc.heading(ulang.get("npm.usage"), 2), - mdc.quote(escape_md(loaded_plugin.metadata.usage)), - mdc.link(ulang.get("npm.homepage"), link) if link else mdc.paragraph(ulang.get("npm.no_homepage")) + mdc.paragraph(loaded_plugin.metadata.usage.replace("\n", "\n\n")), + mdc.link(ulang.get("npm.homepage"), link) if link else mdc.paragraph(ulang.get("npm.homepage")) ] await md.send_md(compile_md(reply), bot, event=event) else: diff --git a/liteyuki/plugins/liteyuki_statistics/__init__.py b/liteyuki/plugins/liteyuki_statistics/__init__.py index 87d22c5..1333094 100644 --- a/liteyuki/plugins/liteyuki_statistics/__init__.py +++ b/liteyuki/plugins/liteyuki_statistics/__init__.py @@ -6,10 +6,18 @@ from .stat_restful_api import * __author__ = "snowykami" __plugin_meta__ = PluginMetadata( name="统计信息", - description="统计机器人的信息", + description="统计机器人的信息,包括消息、群聊等,支持排名、图表等功能", usage=( - "stat msg [limit] 查看统计次数内的消息\n" - "stat msg -g|--group [group_id] 查看群的统计信息,不带参数为全群\n" + "```\nstatistic message 查看统计消息\n" + "可选参数:\n" + " -g|--group [group_id] 指定群聊\n" + " -u|--user [user_id] 指定用户\n" + " -d|--duration [duration] 指定时长\n" + " -p|--period [period] 指定次数统计周期\n" + " -b|--bot [bot_id] 指定机器人\n" + "命令别名:\n" + " statistic|stat message|msg|m\n" + "```" ), type="application", homepage="https://github.com/snowykami/LiteyukiBot", diff --git a/liteyuki/utils/message/markdown.py b/liteyuki/utils/message/markdown.py index 919d59d..bed2073 100644 --- a/liteyuki/utils/message/markdown.py +++ b/liteyuki/utils/message/markdown.py @@ -34,7 +34,7 @@ def escape_decorator(func): def compile_md(comps: list[str]) -> str: """ - 编译Markdown文本 + 合成Markdown文本 Args: comps: list[str]: 组件列表