✨ 移除saa依赖

This commit is contained in:
HibiKier
2024-08-11 15:57:33 +08:00
parent 71f3b031d4
commit d0792e0a1c
68 changed files with 1722 additions and 1528 deletions
@@ -3,12 +3,12 @@ from nonebot.permission import SUPERUSER
from nonebot.plugin import PluginMetadata
from nonebot.rule import to_me
from nonebot_plugin_alconna import Alconna, Arparma, on_alconna
from nonebot_plugin_saa import Text
from nonebot_plugin_session import EventSession
from zhenxun.configs.utils import PluginExtraData
from zhenxun.services.log import logger
from zhenxun.utils.enum import PluginType
from zhenxun.utils.message import MessageUtils
from zhenxun.utils.platform import PlatformUtils
__plugin_meta__ = PluginMetadata(
@@ -60,12 +60,12 @@ async def _(
arparma.header_result,
session=session,
)
await Text(f"成功更新了 {num} 个群组的信息").send()
await MessageUtils.build_message(f"成功更新了 {num} 个群组的信息").send()
except Exception as e:
logger.error(
"更新群组信息发生错误", arparma.header_result, session=session, e=e
)
await Text("其他未知错误...").send()
await MessageUtils.build_message("其他未知错误...").send()
@_friend_matcher.handle()
@@ -75,15 +75,15 @@ async def _(
arparma: Arparma,
):
try:
num = await PlatformUtils.update_friend(bot, session.platform)
num = await PlatformUtils.update_friend(bot)
logger.info(
f"更新好友信息完成,共更新了 {num} 个好友的信息!",
arparma.header_result,
session=session,
)
await Text(f"成功更新了 {num} 个好友的信息").send()
await MessageUtils.build_message(f"成功更新了 {num} 个好友的信息").send()
except Exception as e:
logger.error(
"更新好友信息发生错误", arparma.header_result, session=session, e=e
)
await Text("其他未知错误...").send()
await MessageUtils.build_message("其他未知错误...").send()