diff --git a/src/command/commands/get_members.ts b/src/command/commands/get_members.ts index b713337..e517ffd 100755 --- a/src/command/commands/get_members.ts +++ b/src/command/commands/get_members.ts @@ -37,7 +37,9 @@ export default { for (const member of member_data) { let nickname: string; try { - nickname = (await interaction.guild.members.fetch(member[0])).nickname; + nickname = + (await interaction.guild.members.fetch(member[0])).nickname || + (await interaction.client.users.fetch(member[0])).username; } catch (e) { nickname = ``; } diff --git a/src/command/commands/search.ts b/src/command/commands/search.ts index 97bdb45..a5d073d 100755 --- a/src/command/commands/search.ts +++ b/src/command/commands/search.ts @@ -73,9 +73,10 @@ export default { content: "`에러`: 해당 멤버는 등록되지 않았어요!", }); } - let text = ""; - text += (await interaction.guild.members.fetch(discord_id)).nickname; + text += + (await interaction.guild.members.fetch(discord_id)).nickname || + interaction.user.username; text += ": "; for (const user of the_datas.docs) { const minecraft_uuid = user.data()["minecraft_uuid"];