mcl目前配置好了,然后按照https://github.com/ieew/nonebot_adapter_mirai2/wiki上面的教程给两边进行了配置,之后先起mcl再起nb,结果mcl这边可以收到消息,nb那边收不到。
请求大佬帮忙看下配置和日志,是哪里出了问题?
mirai-api-http的配置:
adapters:
- ws
debug: false
enableVerify: true
verifyKey: INITKEYgdQ7LPBm
singleMode: false
cacheSize: 2048
adapterSettings:
ws:
host: localhost
port: 5700
nb这边的.env:
ENVIRONMENT=dev
VERIFY_KEY=INITKEYgdQ7LPBm
driver=~fastapi+~websockets
MIRAI_HOST=127.0.0.1
MIRAI_PORT=5700
MIRAI_QQ=["xxxxxxxxxx"]
SUPERUSERS=[]
mcl这边api插件的日志:
2023-11-29 15:17:00 W/mirai-api-http: USING INITIAL KEY, please edit the key
2023-11-29 15:17:00 I/Mirai HTTP API: ********************************************************
2023-11-29 15:17:00 I/MahKtorAdapter[ws]: Autoreload is disabled because the development mode is off.
2023-11-29 15:17:00 I/MahKtorAdapter[ws]: Application started in 0.063 seconds.
2023-11-29 15:17:00 I/MahKtorAdapter[ws]: Responding at http://localhost:5700
2023-11-29 15:17:00 I/ws adapter: >>> [ws adapter] is listening at ws://localhost:5700
2023-11-29 15:17:00 I/Mirai HTTP API: Http api server is running with verifyKey: INITKEYgdQ7LPBm
2023-11-29 15:17:00 I/Mirai HTTP API: adaptors: [ws]
2023-11-29 15:17:00 I/Mirai HTTP API: ********************************************************
mcl这边接受消息的日志:
2023-11-29 15:17:18 I/Bot.xxxxxxxxxx: Saved account secrets to local cache for fast login.
2023-11-29 15:17:18 I/Bot.xxxxxxxxxx: Login successful.
2023-11-29 15:17:18 V/Bot.xxxxxxxxxx: Event: BotOnlineEvent(bot=Bot(xxxxxxxxxx))
2023-11-29 15:17:18 I/Bot.xxxxxxxxxx: Bot login successful.
xxxx(xxxxxxxxxx) Login successful
2023-11-29 15:17:30 V/Bot.xxxxxxxxxx: xxxx(xxxxxxxxxx) -> 1
2023-11-29 15:17:33 V/Bot.xxxxxxxxxx: xxxx(xxxxxxxxxx) -> 121
nb这边的日志:
11-29 15:17:48 [SUCCESS] nonebot | NoneBot is initializing...
11-29 15:17:48 [INFO] nonebot | Current Env: dev
11-29 15:17:48 [DEBUG] nonebot | Loaded Config: {'driver': '~fastapi', 'host': IPv4Address('127.0.0.1'), 'port': 8080, 'log_level': 'DEBUG', 'api_timeout': 30.0, 'superusers': set(), 'nickname': set(), 'command_start': {'/'}, 'command_sep': {'.'}, 'session_expire_timeout': datetime.timedelta(seconds=120), 'mirai_host': '127.0.0.1', 'mirai_qq': ['xxxxxxxxxx'], 'verify_key': 'INITKEYgdQ7LPBm', 'mirai_port': 5700, 'environment': 'dev'}
11-29 15:17:48 [DEBUG] nonebot | Succeeded to load adapter "mirai2"
11-29 15:17:48 [SUCCESS] nonebot | Succeeded to load plugin "test" from "src.plugins.test"
11-29 15:17:48 [WARNING] __main__ | Always use `nb run` to start the bot instead of manually running!
11-29 15:17:48 [SUCCESS] nonebot | Running NoneBot...
11-29 15:17:48 [DEBUG] nonebot | Loaded adapters: mirai2
11-29 15:17:49 [INFO] uvicorn | Started server process [21180]
11-29 15:17:49 [INFO] uvicorn | Waiting for application startup.
11-29 15:17:49 [INFO] uvicorn | Application startup complete.
11-29 15:17:49 [INFO] uvicorn | Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit)