【发布时间】:2020-08-30 03:25:12
【问题描述】:
我的机器人发送随机 gif,但不嵌入。我想发送带有嵌入的随机 GIF。我怎么能这样?
代码:
if (msg.author.bot) return;
if (msg.content.toLowerCase() === prefix + 'xgif' ) {
number = 100;
imageNumber = Math.floor (Math.random() * (number -1 + 1)) + 1;
client.channels.cache.get(`channelID`).send( {files: ["./images/" + imageNumber + ".gif"]})
}
【问题讨论】:
标签: javascript node.js discord discord.js