ForteScarlet / simple-robot-component-mirai-springboot-starter

a springboot starter for component-mirai
2 stars 0 forks source link

版本2.2.1 使用MessageContentBuilder构建图片消息时报错 #2

Open lengmaomao opened 3 years ago

lengmaomao commented 3 years ago

InputStream stream = new FileInputStream("P:\\leng-bot\\image\\文件名.png"); MessageContentBuilder builder = builderFactory.getMessageContentBuilder(); MessageContent content = builder.image(stream).build(); sender.SENDER.sendPrivateMsg(privateMsg.getAccountInfo().getAccountCode(), content); 当使用InputStream进行图片消息构建发送时报错java.lang.IllegalArgumentException: he img has no source in [CAT:image,type=stream]