diff --git a/liteyuki/plugins/liteyuki_statistics/stat_monitors.py b/liteyuki/plugins/liteyuki_statistics/stat_monitors.py index 63b2000..f66f15c 100644 --- a/liteyuki/plugins/liteyuki_statistics/stat_monitors.py +++ b/liteyuki/plugins/liteyuki_statistics/stat_monitors.py @@ -14,14 +14,17 @@ from liteyuki.utils import satori_utils require("nonebot_plugin_alconna") -@event_postprocessor async def general_event_monitor(bot: T_Bot, event: T_MessageEvent): - if isinstance(bot, satori.Bot): - return await satori_event_monitor(bot, event) - elif isinstance(bot, v11.Bot): - return await onebot_v11_event_monitor(bot, event) + print("POST PROCESS") + # if isinstance(bot, satori.Bot): + # print("POST PROCESS SATORI EVENT") + # return await satori_event_monitor(bot, event) + # elif isinstance(bot, v11.Bot): + # print("POST PROCESS V11 EVENT") + # return await onebot_v11_event_monitor(bot, event) +@event_postprocessor async def onebot_v11_event_monitor(bot: v11.Bot, event: v11.MessageEvent): if event.message_type == "group": event: v11.GroupMessageEvent @@ -44,6 +47,7 @@ async def onebot_v11_event_monitor(bot: v11.Bot, event: v11.MessageEvent): msg_db.save(mem) +@event_postprocessor async def satori_event_monitor(bot: satori.Bot, event: satori.MessageEvent): if event.guild is not None: event: satori.MessageEvent diff --git a/liteyuki/utils/base/ly_typing.py b/liteyuki/utils/base/ly_typing.py index c13ce30..31242e1 100644 --- a/liteyuki/utils/base/ly_typing.py +++ b/liteyuki/utils/base/ly_typing.py @@ -4,5 +4,5 @@ from nonebot.adapters import satori T_Bot = v11.Bot | v12.Bot | satori.Bot T_GroupMessageEvent = v11.GroupMessageEvent | v12.GroupMessageEvent T_PrivateMessageEvent = v11.PrivateMessageEvent | v12.PrivateMessageEvent -T_MessageEvent = v11.MessageEvent | v12.MessageEvent # | satori.MessageEvent +T_MessageEvent = v11.MessageEvent | v12.MessageEvent | satori.MessageEvent T_Message = v11.Message | v12.Message | satori.Message