【发布时间】:2021-11-16 12:03:21
【问题描述】:
它的作用是在嵌入有 footer.text 时添加反应 :pray:,但我不希望这样,我希望它在没有 footer.text 时作出反应
if(message.embeds.length >= 0)
// Check if the Message has embed or not
{
let embed = message.embeds
// console.log(embed) just a console.log
for(let i = 0; i < embed.length; i++)
// Loop it since in v13 you can send multiple embed in single message
{
if (!embed[i] || !embed[i].footer || embed[i].footer.text === null) return;
// check each embed if it has footer.text or not, if it doesnt then do nothing
{
setTimeout(function(){
message.react(':pray:')
}, 1000);
}
}
}
【问题讨论】:
标签: javascript node.js discord discord.js