NTEUID icon indicating copy to clipboard operation
NTEUID copied to clipboard

[Bug] 面板出图报错:Bot.send() got an unexpected keyword argument 'wait_recall'

Open chomoe327 opened this issue 5 months ago • 1 comments

问题描述 (Describe the bug) 在使用安魂曲面板查卡时,后端抛出 TypeError 异常,导致无法正常发送图片。 经排查,报错发生于 nte_role/role_service.py 第 121 行。代码在调用 bot.send() 时硬编码传入了 wait_recall=True 参数。但部分适配器(如 napcat-plugin-gscore-adapter)的 send 方法并未定义该参数,且没有使用 kwargs 吸收多余参数,导致强行传入时程序直接崩溃。

[SV] 安魂曲|||面板 执行时出现错误!
[17:15:57]
ERROR
Bot.send() got an unexpected keyword argument 'wait_recall'
exception=Traceback (most recent call last):
  File "/gsuid_core/gsuid_core/sv.py", line 38, in wrapper
    result = await func(bot, event)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/gsuid_core/gsuid_core/plugins/NTEUID/NTEUID/nte_role/__init__.py", line 103, in nte_role_detail
    await run_character_detail(bot, ev, char_name)
  File "/gsuid_core/gsuid_core/plugins/NTEUID/NTEUID/nte_role/role_service.py", line 121, in run_character_detail
    message_ids = await bot.send(MessageSegment.image(img), wait_recall=True)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Bot.send() got an unexpected keyword argument 'wait_recall'

使用的适配器:napcat-plugin-gscore-adapter v1.3.1

插件版本:最新版 NTEUID

chomoe327 avatar Jul 03 '26 09:07 chomoe327

core本体更新

tyql688 avatar Jul 04 '26 01:07 tyql688