fix search data getting error

This commit is contained in:
kdh8219 2023-04-29 18:41:29 +09:00
parent c099eccbf8
commit e344d040f6

View file

@ -75,14 +75,15 @@ export default {
} }
let text = ""; let text = "";
text += interaction.guild.members.cache.get(discord_id).nickname; text += (await interaction.guild.members.fetch(discord_id)).nickname;
text += ": "; text += ": ";
for (const user of the_datas.docs) { for (const user of the_datas.docs) {
const minecraft_uuid = user["minecraft_uuid"]; const minecraft_uuid = user.data()["minecraft_uuid"];
text += mojangAPI.getIdFromUUID(minecraft_uuid); text += await mojangAPI.getIdFromUUID(minecraft_uuid);
text += ` [${minecraft_uuid}]`;
text += ", "; text += ", ";
} }
text = text.slice(0, -1); text = text.slice(0, -2);
interaction.editReply({ interaction.editReply({
content: text, content: text,
}); });