mirror of
https://github.com/ChenXu233/nonebot_plugin_dialectlist.git
synced 2024-11-27 17:45:07 +08:00
🔀 Merge branch 'master' into feat#20#39
This commit is contained in:
commit
53e52eabb5
@ -269,6 +269,7 @@ async def handle_rank(
|
|||||||
logger.debug(f"获取用户信息花费时间:{t.time() - t1}")
|
logger.debug(f"获取用户信息花费时间:{t.time() - t1}")
|
||||||
|
|
||||||
string: str = ""
|
string: str = ""
|
||||||
|
if plugin_config.show_text_rank:
|
||||||
|
|
||||||
if keyword:
|
if keyword:
|
||||||
string += f"关于{keyword}的话痨榜结果:\n"
|
string += f"关于{keyword}的话痨榜结果:\n"
|
||||||
@ -286,17 +287,18 @@ async def handle_rank(
|
|||||||
string += str_example
|
string += str_example
|
||||||
|
|
||||||
msg = saa.Text(string)
|
msg = saa.Text(string)
|
||||||
t1 = t.time()
|
|
||||||
|
|
||||||
if plugin_config.visualization:
|
if plugin_config.visualization:
|
||||||
|
t1 = t.time()
|
||||||
image = await get_rank_image(rank2)
|
image = await get_rank_image(rank2)
|
||||||
msg += saa.Image(image)
|
msg += saa.Image(image)
|
||||||
|
logger.debug(f"群聊消息渲染图片花费时间:{t.time() - t1}")
|
||||||
|
|
||||||
if plugin_config.suffix:
|
if plugin_config.suffix:
|
||||||
timecost = t.time() - state["t1"]
|
timecost = t.time() - state["t1"]
|
||||||
suffix = saa.Text(plugin_config.string_suffix.format(timecost=timecost))
|
suffix = saa.Text(plugin_config.string_suffix.format(timecost=timecost))
|
||||||
msg += suffix
|
msg += suffix
|
||||||
|
if not msg:
|
||||||
logger.debug(f"群聊消息渲染图片花费时间:{t.time() - t1}")
|
await saa.Text("你把可视化都关了哪来的排行榜?").finish()
|
||||||
|
|
||||||
await msg.finish(reply=True)
|
await msg.finish(reply=True)
|
||||||
|
@ -9,6 +9,7 @@ class ScopedConfig(BaseModel):
|
|||||||
suffix: bool = True # 是否显示后缀
|
suffix: bool = True # 是否显示后缀
|
||||||
excluded_self: bool = True # 是否排除自己
|
excluded_self: bool = True # 是否排除自己
|
||||||
visualization: bool = True # 是否可视化
|
visualization: bool = True # 是否可视化
|
||||||
|
show_text_rank:bool = True # 是否显示文本排名
|
||||||
counting_cache: bool = False # 计数缓存(能够提高回复速度)
|
counting_cache: bool = False # 计数缓存(能够提高回复速度)
|
||||||
excluded_people: List[str] = [] # 排除的人的QQ号
|
excluded_people: List[str] = [] # 排除的人的QQ号
|
||||||
use_user_info_cache: bool = False # 是否使用用户信息缓存
|
use_user_info_cache: bool = False # 是否使用用户信息缓存
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "nonebot-plugin-dialectlist"
|
name = "nonebot-plugin-dialectlist"
|
||||||
version = "2.4.3"
|
version = "2.4.4"
|
||||||
description = "看看你群群友有多能说"
|
description = "看看你群群友有多能说"
|
||||||
authors = [
|
authors = [
|
||||||
{name = "Chen_Xu233", email = "woyerpa@outlook.com"},
|
{name = "Chen_Xu233", email = "woyerpa@outlook.com"},
|
||||||
|
Loading…
Reference in New Issue
Block a user