@shun 这个地址是怎么获取的?
J
JamesLee66 发布的帖子
-
图片下载失败
在消息链中获取到imageId,根据imageId构造Image对象,通过String imageUrl = Image.queryUrl(image);获取下载链接,下载链接打不开
mirai-core 版本
2.16.0
bot-protocol
ANDROID_PAD
复现代码:
String imageId = "{57454715-A857-BAD2-D863-CA717CB64A5B}.jpg"; Image.Builder builder = Image.newBuilder(imageId); builder.setType(ImageType.valueOf(imageMessage.getImageType())); builder.setWidth(imageMessage.getWidth()); builder.setHeight(imageMessage.getHeight()); builder.setSize(imageMessage.getSize()); builder.setEmoji(imageMessage.getEmoji()); Image image = builder.build(); String imageUrl = Image.queryUrl(image);