基本上,标题说的是,字段未添加到我的嵌入中。这是我的代码:
const embed = new Discord.RichEmbed()
.setTitle('Help')
.setDescription('Available Commands')
.setAuthor(client.user.username, client.user.avatarURL)
.setColor('#3fa8ff')
// .setTimestamp()
console.log(categories);
for (var i = 0; i < categories.length; i++) {
var tempDesc = '';
for (var c in commands) {
if (categories[i] === commands[c].category) {
tempDesc += `${commands[c]} - ${commands[c].description} - ${commands[c].usage}\n`;
}
}
embed.addField(categories[i], tempDesc);
}
message.channel.send({
embed
});
我试图注释掉.setTimestamp()
之类的东西,但没有任何效果。我在做什么错了?
答案 0 :(得分:0)
弄清楚了,我很愚蠢,弄混了列表和数组。