如何往qq发送文件?
#490
Replies: 1 comment
-
|
在 ob v11 里,文件要以 file uri 的形式传递路径。即: from pathlib import Path
file_uri = Path("/path/to/your/file").as_uri() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我使用的是nonebot+llonebot的正向ws(其他方式貌似连不上,适配器是ai)方式使用机器人,在我的插件中我想要给用户上传文件
我问了chatgpt,它给了我一段代码,我稍微修改后,代码片段是这样的
但是这个会报错
ActionFailed(status='failed', retcode=1200, data=None, message="Error: ENOENT: no such file or directory, open 'C:\\Users\\wsles\\Documents\\LiteloaderQQNT\\data\\LLOneBot\\temp\\908cbcd4-1ef9-4820-be19-44ac7019bcf6'", wording="Error: ENOENT: no such file or directory, open 'C:\\Users\\wsles\\Documents\\LiteloaderQQNT\\data\\LLOneBot\\temp\\908cbcd4-1ef9-4820-be19-44ac7019bcf6'", echo='1')我感觉是llonebot的问题,但是没有得到准确的回复
因此我想问一下我的方法是否正确,如果不是,能否告诉我正确的方式?
Beta Was this translation helpful? Give feedback.
All reactions