-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
支持Lagrange端FileMessage
的接收
#111
Labels
feature
新功能请求
Comments
写 go cqhttp 的文件支持的时候见过 busid,把它当成这个文件的id来使用就好了 对于这个 file 字段,写过类似的转换 |
busid 没用上,最后加了 FileMessageWithUrl,用于在消息接收时读取 url,我没搭 Lagrange 环境,试试能不能用 |
Lagrange的File方式应该又变了,现在是:
对应机器人的log是:
LagrangeDev/Lagrange.Core#708 (comment) 应该可以用正常方式进行获取了,不需要走Event事件 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在Onebot中没有定义文件的消息段,但是定义了group_upload事件,应该对应Mirai的FileMessage;但是因为历史缘故,Mirai的FileMessage实现为:
public fun FileMessage(id: String, internalId: Int, name: String, size: Long)
,name 与 size 只供本地使用, 发送消息时只会使用 id 和 internalId.而Onebot的group_upload为
time
self_id
post_type
notice
notice_type
group_upload
group_id
user_id
file
其中
file
字段的内容如下:id
name
size
busid
差距挺大,感觉无从下手
Onebot(Lagrange)日志为:
Onebot(Lagrange)会传递一条空的消息提供message_id,再用group_upload提供文件详情
如果要作为FileMessage的话还需要将这两条消息组合起来才能正常进行回复、撤回等操作
感觉会很麻烦,先留个issue在这儿
The text was updated successfully, but these errors were encountered: