部分解耦了 konaph 的一些层

This commit is contained in:
2025-11-01 17:52:05 +08:00
parent adfbac7d90
commit 01fe33eb9f
12 changed files with 411 additions and 242 deletions

View File

@ -1,10 +1,13 @@
from typing import Any, cast
import nonebot
from nonebot_plugin_alconna import UniMessage
from nonebot.adapters.onebot.v11 import Bot as OBBot
from nonebot_plugin_alconna import UniMessage
async def qq_broadcast(groups: list[str], msg: UniMessage[Any]):
async def qq_broadcast(groups: list[str], msg: UniMessage[Any] | str):
if isinstance(msg, str):
msg = UniMessage.text(msg)
bots: dict[str, OBBot] = {}
# group_id -> bot_id