From 4bc87ca747f6159df07d606c90f71179ee5a8435 Mon Sep 17 00:00:00 2001 From: mengshouer Date: Tue, 16 Mar 2021 10:04:32 +0000 Subject: [PATCH 1/3] =?UTF-8?q?:beers:=20publish=20plugin=20bilibili?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E3=80=81=E7=95=AA=E5=89=A7=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/public/plugins.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/.vuepress/public/plugins.json b/docs/.vuepress/public/plugins.json index 84afb436..fe42b41a 100644 --- a/docs/.vuepress/public/plugins.json +++ b/docs/.vuepress/public/plugins.json @@ -214,5 +214,13 @@ "desc": "基于 import hook 的插件管理", "author": "Jigsaw111", "repo": "Jigsaw111/nonebot_plugin_manager" + }, + { + "id": "nonebot_plugin_analysis_bilibili", + "link": "nonebot-plugin-analysis-bilibili", + "name": "bilibili视频、番剧解析", + "desc": "自动解析bilibili视频、番剧解析", + "author": "mengshouer", + "repo": "mengshouer/nonebot_plugin_analysis_bilibili" } ] \ No newline at end of file From f3e78cc82e33764dfa010bf23202f93f784dfec2 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Mon, 22 Mar 2021 09:25:11 +0000 Subject: [PATCH 2/3] =?UTF-8?q?:beers:=20publish=20plugin=20=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E6=95=B0=E6=8D=AE=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/public/plugins.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/.vuepress/public/plugins.json b/docs/.vuepress/public/plugins.json index fe42b41a..2893869f 100644 --- a/docs/.vuepress/public/plugins.json +++ b/docs/.vuepress/public/plugins.json @@ -222,5 +222,13 @@ "desc": "自动解析bilibili视频、番剧解析", "author": "mengshouer", "repo": "mengshouer/nonebot_plugin_analysis_bilibili" + }, + { + "id": "nonebot_plugin_localstore", + "link": "nonebot-plugin-localstore", + "name": "本地数据存储", + "desc": "存储插件数据至本地文件", + "author": "yanyongyu", + "repo": "nonebot/plugin-localstore" } ] \ No newline at end of file From ade5d923abe506eebaa44c3f83eb6cd922a95e85 Mon Sep 17 00:00:00 2001 From: SinonJZH <44700327+SinonJZH@users.noreply.github.com> Date: Mon, 29 Mar 2021 21:02:50 +0800 Subject: [PATCH 3/3] :bug: fix mirai message chain empty --- .../nonebot/adapters/mirai/utils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/utils.py b/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/utils.py index 74ad9f6e..14879170 100644 --- a/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/utils.py +++ b/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/utils.py @@ -11,7 +11,7 @@ from nonebot.message import handle_event from nonebot.utils import escape_tag, logger_wrapper from .event import Event, GroupMessage, MessageEvent, MessageSource -from .message import MessageType +from .message import MessageType, MessageSegment if TYPE_CHECKING: from .bot import Bot @@ -64,7 +64,7 @@ class ActionFailed(exception.ActionFailed): class InvalidArgument(exception.AdapterException): """ :说明: - + 调用API的参数出错 """ @@ -106,7 +106,7 @@ def argument_validation(function: _AnyCallable) -> _AnyCallable: :说明: 通过函数签名中的类型注解来对传入参数进行运行时校验 - + 会在参数出错时释放 ``InvalidArgument`` 异常 """ function = validate_arguments(config={ @@ -138,6 +138,8 @@ def process_at(bot: "Bot", event: GroupMessage) -> GroupMessage: event.to_me = True else: event.message_chain.insert(0, at) + if not event.message_chain: + event.message_chain.append(MessageSegment.plain('')) return event @@ -175,4 +177,4 @@ async def process_event(bot: "Bot", event: Event) -> None: event = process_nick(bot, event) event = process_at(bot, event) event = process_reply(bot, event) - await handle_event(bot, event) \ No newline at end of file + await handle_event(bot, event)