Skip to content

转发图片出错 #169

Closed Answered by ForteScarlet
jiangdengke asked this question in Q&A
Sep 10, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

首先,需要确保 Object obj 的确是一个图片连接字符串。

其次,MiraiForwardMessageBuilder添加一个消息元素还需要其他参数,例如消息的发送人、或发送人的ID和昵称等。这些信息在IDE提示、API文档或源码注释等地方都应当都很清晰。
例如:

final var image = MiraiSendOnlyImage.of(Resource.of(new URL(pictureUrl)));
miraiForwardMessageBuilder.add(123L, "发送人昵称", image);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jiangdengke
Comment options

Answer selected by ForteScarlet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
组件:mirai 与mirai组件有关的内容
2 participants