nonebot-plugin-dialectlist 2.4.3__tar.gz → 2.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nonebot_plugin_dialectlist-2.4.3/nonebot_plugin_dialectlist.egg-info → nonebot_plugin_dialectlist-2.4.4}/PKG-INFO +1 -1
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist/__init__.py +16 -13
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist/config.py +1 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4/nonebot_plugin_dialectlist.egg-info}/PKG-INFO +1 -1
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/pyproject.toml +1 -1
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/LICENSE +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/MANIFEST.in +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/README.md +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist/model.py +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist/storage.py +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist/template/avatar/default.jpg +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist/template/css/style.css +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist/template/rank_template.j2 +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist/time.py +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist/usage.py +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist/utils.py +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist.egg-info/SOURCES.txt +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist.egg-info/dependency_links.txt +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist.egg-info/requires.txt +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/nonebot_plugin_dialectlist.egg-info/top_level.txt +0 -0
- {nonebot_plugin_dialectlist-2.4.3 → nonebot_plugin_dialectlist-2.4.4}/setup.cfg +0 -0
|
@@ -257,30 +257,33 @@ async def handle_rank(
|
|
|
257
257
|
t1 = t.time()
|
|
258
258
|
rank2 = await get_user_infos(bot, event, rank)
|
|
259
259
|
logger.debug(f"获取用户信息花费时间:{t.time() - t1}")
|
|
260
|
-
|
|
260
|
+
|
|
261
261
|
string: str = ""
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
262
|
+
|
|
263
|
+
if plugin_config.show_text_rank:
|
|
264
|
+
for i in rank2:
|
|
265
|
+
logger.debug(i.user_name)
|
|
266
|
+
for i in range(len(rank2)):
|
|
267
|
+
str_example = plugin_config.string_format.format(
|
|
268
|
+
index=rank2[i].user_index,
|
|
269
|
+
nickname=rank2[i].user_nickname,
|
|
270
|
+
chatdatanum=rank2[i].user_bnum,
|
|
271
|
+
)
|
|
272
|
+
string += str_example
|
|
271
273
|
|
|
272
274
|
msg = saa.Text(string)
|
|
273
|
-
t1 = t.time()
|
|
274
275
|
|
|
275
276
|
if plugin_config.visualization:
|
|
277
|
+
t1 = t.time()
|
|
276
278
|
image = await get_rank_image(rank2)
|
|
277
279
|
msg += saa.Image(image)
|
|
280
|
+
logger.debug(f"群聊消息渲染图片花费时间:{t.time() - t1}")
|
|
278
281
|
|
|
279
282
|
if plugin_config.suffix:
|
|
280
283
|
timecost = t.time() - state["t1"]
|
|
281
284
|
suffix = saa.Text(plugin_config.string_suffix.format(timecost=timecost))
|
|
282
285
|
msg += suffix
|
|
283
|
-
|
|
284
|
-
|
|
286
|
+
if not msg:
|
|
287
|
+
await saa.Text("你把可视化都关了哪来的排行榜?").finish()
|
|
285
288
|
|
|
286
289
|
await msg.finish(reply=True)
|
|
@@ -9,6 +9,7 @@ class ScopedConfig(BaseModel):
|
|
|
9
9
|
suffix: bool = True # 是否显示后缀
|
|
10
10
|
excluded_self: bool = True # 是否排除自己
|
|
11
11
|
visualization: bool = True # 是否可视化
|
|
12
|
+
show_text_rank:bool = True # 是否显示文本排名
|
|
12
13
|
counting_cache: bool = False # 计数缓存(能够提高回复速度)
|
|
13
14
|
excluded_people: List[str] = [] # 排除的人的QQ号
|
|
14
15
|
use_user_info_cache: bool = False # 是否使用用户信息缓存
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|