yzyyz1387 / nonebot_plugin_code

nonebot2在线运行代码
MIT License
64 stars 7 forks source link

求适配拉格兰 #9

Open ElainaFanBoy opened 6 months ago

ElainaFanBoy commented 6 months ago

拉格兰收到的消息需要转义,求适配

cinyan10 commented 4 months ago
image

同求

06-24 23:19:52 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_code, lineno=26) failed.
Traceback (most recent call last):
  File "<string>", line 17, in <module>
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot/__init__.py", line 335, in run
    get_driver().run(*args, **kwargs)
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot/drivers/fastapi.py", line 186, in run
    uvicorn.run(
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/uvicorn/main.py", line 577, in run
    server.run()
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/uvicorn/server.py", line 65, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/root/.pyenv/versions/3.12.3/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
  File "/root/.pyenv/versions/3.12.3/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot/message.py", line 476, in check_and_run_matcher
    await _run_matcher(
> File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot/message.py", line 428, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot/internal/matcher/matcher.py", line 850, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot/internal/matcher/matcher.py", line 825, in simple_run
    await handler(
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot/dependencies/__init__.py", line 94, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot_plugin_code/__init__.py", line 37, in runcode_body
    return await bot.call_api("send_private_forward_msg", user_id=event.user_id, messages=messages)
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot/internal/adapter/bot.py", line 122, in call_api
    raise exception
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot/internal/adapter/bot.py", line 97, in call_api
    result = await self.adapter._call_api(self, api, **data)
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot/adapters/onebot/v11/adapter.py", line 147, in _call_api
    return handle_api_result(await self._result_store.fetch(seq, timeout))
  File "/root/qqbot-kzcharm/axekz-qqbot/.venv/lib/python3.12/site-packages/nonebot/adapters/onebot/v11/utils.py", line 58, in handle_api_result
    raise ActionFailed(**result)
nonebot.adapters.onebot.v11.exception.ActionFailed: ActionFailed(status='failed', retcode=200, data=None, echo='3')