diff --git a/nonebot_plugin_dialectlist/__init__.py b/nonebot_plugin_dialectlist/__init__.py index 631b17b..02a2a3a 100644 --- a/nonebot_plugin_dialectlist/__init__.py +++ b/nonebot_plugin_dialectlist/__init__.py @@ -224,7 +224,9 @@ async def handle_rank( await saa.Text("没有指定群哦").finish() if plugin_config.counting_cache: + t1 = t.time() raw_rank = await get_cache(start, stop, id) + logger.debug(f"获取计数消息花费时间:{t.time() - t1}") else: t1 = t.time() messages = await get_message_records( @@ -237,8 +239,8 @@ async def handle_rank( time_stop=stop, exclude_id1s=plugin_config.excluded_people, ) - logger.debug(f"获取计数消息花费时间:{t.time() - t1}") raw_rank = msg_counter(messages) + logger.debug(f"获取计数消息花费时间:{t.time() - t1}") if not raw_rank: await saa.Text("明明这个时间段都没有人说话怎么会有话痨榜呢?").finish() diff --git a/nonebot_plugin_dialectlist/config.py b/nonebot_plugin_dialectlist/config.py index 69703c4..6b42148 100644 --- a/nonebot_plugin_dialectlist/config.py +++ b/nonebot_plugin_dialectlist/config.py @@ -6,10 +6,10 @@ from nonebot import get_driver, get_plugin_config class ScopedConfig(BaseModel): get_num: int = 5 # 获取人数数量 font: str = "SimHei" # 字体格式 - suffix: bool = False # 是否显示后缀 + suffix: bool = True # 是否显示后缀 excluded_self: bool = True # 是否排除自己 visualization: bool = True # 是否可视化 - counting_cache: bool = True # 计数缓存(能够提高回复速度) + counting_cache: bool = False # 计数缓存(能够提高回复速度) excluded_people: List[str] = [] # 排除的人的QQ号 timezone: Optional[str] = "Asia/Shanghai" # 时区,影响统计时间 string_suffix: str = "统计花费时间:{timecost}秒" # 消息格式后缀