mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-14 00:20:06 +08:00
✨ 移除saa依赖
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user