Files
zhenxun_bot/zhenxun/builtin_plugins/platform/__init__.py
T
HibiKier ccee16bed2 🚨 Add specific ignore items in pyright ignore
🚨 Make pyright happy
♻️ Remove unused adapter
2025-01-10 12:19:11 +08:00

26 lines
611 B
Python

from pathlib import Path
import nonebot
from zhenxun.services.log import logger
path = Path(__file__).parent
try:
from nonebot.adapters.onebot.v11 import Bot
nonebot.load_plugins(str((path / "qq").resolve()))
except ImportError:
logger.warning("未安装 onebot-adapter,无法加载QQ平台专用插件...")
try:
from nonebot.adapters.qq import ( # noqa: F401 # pyright: ignore [reportMissingImports]
Bot,
)
nonebot.load_plugins(str((path / "qq_api").resolve()))
except ImportError:
logger.warning("未安装 qq-adapter,无法加载QQ官平台专用插件...")