mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-07 21:00:21 +08:00
✨ 部分功能适配QQ BOT (#1701)
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import nonebot
|
||||
|
||||
from zhenxun.services.log import logger
|
||||
|
||||
path = Path(__file__).parent
|
||||
|
||||
for f in os.listdir(path):
|
||||
_p = path / f
|
||||
if _p.is_dir():
|
||||
nonebot.load_plugins(str(_p.resolve()))
|
||||
|
||||
try:
|
||||
from nonebot.adapters.onebot.v11 import Bot
|
||||
|
||||
nonebot.load_plugins(str((path / "qq").resolve()))
|
||||
except ImportError:
|
||||
logger.warning("未安装 onebot-adapter,无法加载QQ平台专用插件...")
|
||||
|
||||
Reference in New Issue
Block a user