From 2646f94446a875e3639b829e520ce0575d10d2d4 Mon Sep 17 00:00:00 2001 From: RF-Tar-Railt Date: Thu, 5 Sep 2024 08:52:04 +0800 Subject: [PATCH] :bug: version 0.12.5 fix MessageUpdate/Delete type --- nonebot/adapters/satori/event.py | 8 ++++++++ pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/nonebot/adapters/satori/event.py b/nonebot/adapters/satori/event.py index be1a23b..15ce713 100644 --- a/nonebot/adapters/satori/event.py +++ b/nonebot/adapters/satori/event.py @@ -273,6 +273,10 @@ def convert(self): class MessageDeletedEvent(MessageEvent): __type__ = EventType.MESSAGE_DELETED + @override + def get_type(self) -> str: + return "notice" + def convert(self): if self.channel.type == ChannelType.DIRECT: return type_validate_python(PrivateMessageDeletedEvent, model_dump(self)) @@ -284,6 +288,10 @@ def convert(self): class MessageUpdatedEvent(MessageEvent): __type__ = EventType.MESSAGE_UPDATED + @override + def get_type(self) -> str: + return "notice" + def convert(self): if self.channel.type == ChannelType.DIRECT: return type_validate_python(PrivateMessageUpdatedEvent, model_dump(self)) diff --git a/pyproject.toml b/pyproject.toml index d7928bf..9eaaf34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nonebot-adapter-satori" -version = "0.12.4" +version = "0.12.5" description = "Satori Protocol Adapter for Nonebot2" authors = [ {name = "RF-Tar-Railt",email = "rf_tar_railt@qq.com"},