在消息链中获取到imageId,根据imageId构造Image对象,通过String imageUrl = Image.queryUrl(image);获取下载链接,下载链接打不开
7062f0e7-d7e0-440e-b44e-698c627d78ed-image.png
mirai-core 版本
2.16.0bot-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);