合并转发开关!

This commit is contained in:
XuChenXu 2024-11-24 19:39:07 +08:00
parent 4e339bcdb1
commit 53b2a33923
2 changed files with 15 additions and 5 deletions

View File

@ -85,6 +85,12 @@ async def _build_cache(bot: Bot, event: Event):
await saa.Text("重建缓存完成。").send(reply=True)
b_cmd = on_alconna(
Alconna(
"看看他的B话",
)
)
rank_cmd = on_alconna(
Alconna(
"B话榜",
@ -301,4 +307,7 @@ async def handle_rank(
if not msg:
await saa.Text("你把可视化都关了哪来的排行榜?").finish()
if plugin_config.aggregate_transmission:
await saa.AggregatedMessageFactory([msg]).finish(reply=True)
else:
await msg.finish(reply=True)

View File

@ -13,6 +13,7 @@ class ScopedConfig(BaseModel):
counting_cache: bool = False # 计数缓存(能够提高回复速度)
excluded_people: List[str] = [] # 排除的人的QQ号
use_user_info_cache: bool = False # 是否使用用户信息缓存
aggregate_transmission:bool = False # 是否聚合转发消息
timezone: Optional[str] = "Asia/Shanghai" # 时区,影响统计时间
string_suffix: str = "统计花费时间:{timecost}" # 消息格式后缀
template_path: str = "./template/rank_template.j2" # 模板路径