我想知道如何检索文档中的所有信息并将其用于discord.js嵌入中。
我当前的文档:
我当前的代码:
mongoose.connect('mongodb://¤¤¤¤¤¤¤¤¤¤¤/practice', function(err, db) {
if (err) {
throw err;
}
db.collection("profiles").find({
uuid: `${uuid}`
}, {
kitStatistics: 1
}).toArray(function(err, result) {
if (err) {
throw err;
}
console.log(result);
});
});
message.delete();
let embed = new Discord.RichEmbed()
.setAuthor(`Elorion.net`, `https://image.noelshack.com/fichiers/2019/06/7/1549795460-logo-elorionnetwork.png`)
.setColor(color.elorion)
.addField("Username", username)
.addField("UUID", uuid)
.addField("BuildUHC Elo", result)
.addField("NoDebuff Elo", result)
.addField("Debuff Elo", result)
.addField("AxePvP Elo", result)
.addField("Combo Elo", result)
.addField("Archer Elo", result)
.addField("Skin", `[Download](https://crafatar.com/skins/${uuid}.png)`)
.setThumbnail(`https://crafatar.com/avatars/${uuid}.png?size=400&overlay=true`)
.setFooter(`Ⓒ Elorion.net 2019. All rights reserved`);
message.channel.send(embed)