yobot_remix icon indicating copy to clipboard operation
yobot_remix copied to clipboard

连接NapCatQQ使用时,部分发送群消息功能报错ApiNotAvailable

Open madoka315 opened this issue 9 months ago • 0 comments

由于性能等原因最近不得不使用NapCat作为qqbot端,发现如下问题。 *在以前gocq下,不出现以下描述的问题。

ybplugins/clan_battle/components/realize.py中:

  1. 发送出刀提醒send_remind()群聊发送时报错,导致无法正常通过网页端提醒出刀。
  2. 预约提醒subscribe_remind()发送时报错,导致不能提醒预约。
  3. 下树take_it_of_the_tree()报错,不能提醒下树。

看了下它们都是在同步函数里用asyncio.ensure_future()调api,报错都类似于:

future: <Task finished name='Task-383' coro=<UnifiedApi.call_action() done, defined at C:\Users\Administrator\Desktop\yobot_remix\venv_for_yobot\env\lib\site-packages\aiocqhttp\api_impl.py:171> exception=ApiNotAvailable()>
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\yobot_remix\venv_for_yobot\env\lib\site-packages\aiocqhttp\api_impl.py", line 191, in call_action
raise ApiNotAvailable
aiocqhttp.exceptions.ApiNotAvailable

以为是bot端api没有完善,但这发送群消息是个基础api,经过本地测试也可以正常调用: GET http://127.0.0.1:3000/send_group_msg?self_id=...&group_id=...&message=船新的{boss_num}王来惹~ _(:з)∠)_\n[CQ:at,qq=...] b4d03c39-6ae1-4573-b06b-0516baf08da2 所以不知道问题出在哪里了,求解惑

madoka315 avatar May 31 '24 22:05 madoka315