如何将网络上获取的图片发送给好友 #115
-
涉及的编程语言Java 涉及的组件库No response 疑问描述代码如下: final String msg = content.get(new SecureRandom().nextInt(content.size()));
final String img = images.get(new SecureRandom().nextInt(images.size()));
for (BotManager<?> manager : botManagers) {
if (manager instanceof MiraiBotManager miraiBotManager) {
MiraiBot bot = miraiBotManager.get(Identifies.ID(id));
assert bot != null;
MiraiFriend friend = bot.getFriend(Identifies.ID(qq));
assert friend != null;
friend.sendAsync(msg);
friend.sendAsync(img);
log.info("正在发送定义语录,当前qq={}, 语录={}, img={}", qq, msg, img);
break;
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
ForteScarlet
Mar 26, 2023
Replies: 1 comment 5 replies
-
https://simbot.forte.love/docs/definition/message-overview/standard-message#image |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
ForteScarlet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://simbot.forte.love/docs/definition/message-overview/standard-message#image