From 8f85d9e0c07b1b1fd032f6027a9a7562083b674e Mon Sep 17 00:00:00 2001 From: Cinte Date: Sun, 3 Sep 2023 21:39:03 +0800 Subject: [PATCH] v1.0.1.9 --- nonebot_plugin_bottle/__init__.py | 11 +++++------ pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/nonebot_plugin_bottle/__init__.py b/nonebot_plugin_bottle/__init__.py index a6c7704..cacc32c 100644 --- a/nonebot_plugin_bottle/__init__.py +++ b/nonebot_plugin_bottle/__init__.py @@ -214,12 +214,11 @@ async def _( MessageSegment.reply(message_id) + f"您漂流瓶中的换行数量超过了最大换行限制:{maxrt}。您可尝试减少换行数量。\n当前换行数量:{rt_cnt}" ) - else: - if rtrate != 0 and (msg_len / rt_cnt) <= rtrate: - await throw.finish( - MessageSegment.reply(message_id) - + f"您漂流瓶中的字符换行比率超过了最大字符换行比率限制。\n字符换行比率,是您发送的漂流瓶总字符数量和换行的比值。为了防止刷屏,请您尝试减少漂流瓶的换行数量或增加有意义漂流瓶字符。" - ) + if rtrate != 0 and (msg_len / rt_cnt) <= rtrate: + await throw.finish( + MessageSegment.reply(message_id) + + "您漂流瓶中的字符换行比率超过了最大字符换行比率限制。\n字符换行比率,是您发送的漂流瓶总字符数量和换行的比值。为了防止刷屏,请您尝试减少漂流瓶的换行数量或增加有意义漂流瓶字符。" + ) audit = await text_audit(text=message_text) if not audit == "pass": if audit == "Error": diff --git a/pyproject.toml b/pyproject.toml index 2794ec5..e84d0e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nonebot_plugin_bottle" -version = "1.0.1.8" +version = "1.0.1.9" description = "Bottle post plugin in Nonebot" authors = ["Todysheep "] license = "GNU GPLv3"