确认事项
影响版本
0.4.6
问题描述
如题,测试了一下真寻的写法是没问题或者无法预览但是点击可以查看的

问题在于对于QQ端来说正常运作的我自定义插件的写法
command_handler = on_command()
command_handler.handle()
async def _(bot: Bot, ev: Event):
img = MessageSegment.image(file=img_path)
await command_handler.send(img)
这样的写法就会导致闪退
是本来就不支持这种写法么?不是很了解不好意思。
我可以提供远程 Nonebot 的 API 链接来 Debug
复现步骤
NB 用以下代码可触发闪退 (目前只发现了这个)
MessageSegment.image(file=img_path)
await storecent_getship.send(img)
预期行为
正常发送
日志信息
[2025-02-02][19:02:00][INFO][tracing::span] Server::run_incoming;
[2025-02-02][19:02:00][INFO][warp::server] listening with custom incoming
[2025-02-02][19:02:00][INFO][webview:Proxy.connect@http://tauri.localhost/assets/state-Qqg9BRYa.js:5:1153] 正在尝试连接到反向 WebSocket 服务器 ws://127.0.0.1:8081/onebot/v11/ws
[2025-02-02][19:02:00][DEBUG][tungstenite::handshake::client] Client handshake done.
[2025-02-02][19:02:01][DEBUG][reqwest::connect] starting new connection: https://github.com/
[2025-02-02][19:02:01][DEBUG][reqwest::connect] proxy(http://127.0.0.1:7890) intercepts 'https://github.com/'
[2025-02-02][19:02:01][DEBUG][hyper_util::client::legacy::connect::http] connecting to 127.0.0.1:7890
[2025-02-02][19:02:01][DEBUG][hyper_util::client::legacy::connect::http] connected to 127.0.0.1:7890
[2025-02-02][19:02:01][INFO][webview:Proxy.actionHandle@http://tauri.localhost/assets/state-Qqg9BRYa.js:5:5334] [OneBot V11 标准] 收到 **** 的请求 get_group_list: {}
[2025-02-02][19:02:01][INFO][webview:Proxy.actionHandle@http://tauri.localhost/assets/state-Qqg9BRYa.js:5:5482] [OneBot V11 标准] 响应 **** 的请求 get_group_list: {"status":"ok","retcode":0,"data":[]}
[2025-02-02][19:02:01][INFO][webview:Proxy.connect@http://tauri.localhost/assets/state-Qqg9BRYa.js:5:1469] 已连接到反向 WebSocket 服务器 ws://127.0.0.1:8081/onebot/v11/ws
[2025-02-02][19:02:01][DEBUG][hyper_util::client::legacy::pool] pooling idle connection for ("https", github.com)
[2025-02-02][19:02:01][DEBUG][reqwest::async_impl::client] redirecting 'https://github.com/A-kirami/matcha/releases/latest/download/latest.json' to 'https://github.com/A-kirami/matcha/releases/download/v0.4.6/latest.json'
[2025-02-02][19:02:01][DEBUG][hyper_util::client::legacy::pool] reuse idle connection for ("https", github.com)
[2025-02-02][19:02:02][DEBUG][hyper_util::client::legacy::pool] pooling idle connection for ("https", github.com)
[2025-02-02][19:02:02][DEBUG][reqwest::async_impl::client] redirecting 'https://github.com/A-kirami/matcha/releases/download/v0.4.6/latest.json' to 'https://objects.githubusercontent.com/github-production-release-asset-2e65be/603398192/2316e14d-4a12-4c9d-8361-829d03ec0103?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250202%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250202T110201Z&X-Amz-Expires=300&X-Amz-Signature=46c6c2e40e8a4ed935589478df6e1f1ab90d3185807dd5480586028d1a4446ee&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dlatest.json&response-content-type=application%2Foctet-stream'
[2025-02-02][19:02:02][DEBUG][reqwest::connect] starting new connection: https://objects.githubusercontent.com/
[2025-02-02][19:02:02][DEBUG][reqwest::connect] proxy(http://127.0.0.1:7890) intercepts 'https://objects.githubusercontent.com/'
[2025-02-02][19:02:02][DEBUG][hyper_util::client::legacy::connect::http] connecting to 127.0.0.1:7890
[2025-02-02][19:02:02][DEBUG][hyper_util::client::legacy::connect::http] connected to 127.0.0.1:7890
[2025-02-02][19:02:04][INFO][webview:Proxy.actionHandle@http://tauri.localhost/assets/state-Qqg9BRYa.js:5:5334] [OneBot V11 标准] 收到 **** 的请求 send_msg: {"user_id":****,"message_type":"private","message":[{"type":"image","data":{"file":"E:\\PaoPao_New\\zhenxun\\plugins\\STORecent\\msg.png","type":null,"cache":"true","proxy":"true","timeout":null}}]}
额外补充
No response
参与贡献
确认事项
影响版本
0.4.6
问题描述
如题,测试了一下真寻的写法是没问题或者无法预览但是点击可以查看的
问题在于对于QQ端来说正常运作的我自定义插件的写法
这样的写法就会导致闪退
是本来就不支持这种写法么?不是很了解不好意思。
我可以提供远程 Nonebot 的 API 链接来 Debug
复现步骤
NB 用以下代码可触发闪退 (目前只发现了这个)
预期行为
正常发送
日志信息
额外补充
No response
参与贡献