From e344d040f6044d44d965d07b3608043295ab5be4 Mon Sep 17 00:00:00 2001 From: kdh8219 <65698239+kdh8219@users.noreply.github.com> Date: Sat, 29 Apr 2023 18:41:29 +0900 Subject: [PATCH] fix search data getting error --- src/command/commands/search.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/command/commands/search.ts b/src/command/commands/search.ts index 73c5190..97bdb45 100755 --- a/src/command/commands/search.ts +++ b/src/command/commands/search.ts @@ -75,14 +75,15 @@ export default { } let text = ""; - text += interaction.guild.members.cache.get(discord_id).nickname; + text += (await interaction.guild.members.fetch(discord_id)).nickname; text += ": "; for (const user of the_datas.docs) { - const minecraft_uuid = user["minecraft_uuid"]; - text += mojangAPI.getIdFromUUID(minecraft_uuid); + const minecraft_uuid = user.data()["minecraft_uuid"]; + text += await mojangAPI.getIdFromUUID(minecraft_uuid); + text += ` [${minecraft_uuid}]`; text += ", "; } - text = text.slice(0, -1); + text = text.slice(0, -2); interaction.editReply({ content: text, });