mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-11-11 01:27:29 +08:00
✨ 消息统计新增指定用户选项
This commit is contained in:
parent
b26f8e0d24
commit
1ccf94883a
@ -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.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.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.heading(ulang.get("npm.usage"), 2),
|
||||||
mdc.quote(escape_md(loaded_plugin.metadata.usage)),
|
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.no_homepage"))
|
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)
|
await md.send_md(compile_md(reply), bot, event=event)
|
||||||
else:
|
else:
|
||||||
|
@ -6,10 +6,18 @@ from .stat_restful_api import *
|
|||||||
__author__ = "snowykami"
|
__author__ = "snowykami"
|
||||||
__plugin_meta__ = PluginMetadata(
|
__plugin_meta__ = PluginMetadata(
|
||||||
name="统计信息",
|
name="统计信息",
|
||||||
description="统计机器人的信息",
|
description="统计机器人的信息,包括消息、群聊等,支持排名、图表等功能",
|
||||||
usage=(
|
usage=(
|
||||||
"stat msg [limit] 查看统计次数内的消息\n"
|
"```\nstatistic message 查看统计消息\n"
|
||||||
"stat msg -g|--group [group_id] 查看群的统计信息,不带参数为全群\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",
|
type="application",
|
||||||
homepage="https://github.com/snowykami/LiteyukiBot",
|
homepage="https://github.com/snowykami/LiteyukiBot",
|
||||||
|
@ -34,7 +34,7 @@ def escape_decorator(func):
|
|||||||
|
|
||||||
def compile_md(comps: list[str]) -> str:
|
def compile_md(comps: list[str]) -> str:
|
||||||
"""
|
"""
|
||||||
编译Markdown文本
|
合成Markdown文本
|
||||||
Args:
|
Args:
|
||||||
comps: list[str]: 组件列表
|
comps: list[str]: 组件列表
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user