This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
[提问] 请问当图片数量可变的时候,如何在同一条消息里发送指定数量的图片呢? #448
Answered
by
dog234
bling-yshs
asked this question in
Q&A
-
我做了一个发送沙雕图的js,用户可以发送 添加沙雕图 的命令,来把沙雕图添加到服务器里,沙雕图的信息用json保存,发送 沙雕图 可以随机获取一张沙雕图。但是现在只支持单次添加一张图片。 我现在想做一个一次可以添加多张沙雕图的功能,但是卡在了发送环节 这是我之前的代码,一次可以固定发送一张图片↓ msg.reply([
`这是一段文本`,
segment.image(`1.jpg`),
`这是另一段文本`,
]); 如果想支持多张图片的话,就会面临图片数量不固定的问题了,图片有可能是一张,也有可能是两张三张,所以我就不知道怎么写了...本人js萌新,求大佬指点 图片全都放在同一条消息发送,不是分开发送 |
Beta Was this translation helpful? Give feedback.
Answered by
dog234
Jan 26, 2023
Replies: 2 comments 2 replies
-
数组push就行 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bling-yshs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
数组push就行