fix nickname null bug
This commit is contained in:
parent
e344d040f6
commit
1ab0a8c21d
|
@ -37,7 +37,9 @@ export default {
|
||||||
for (const member of member_data) {
|
for (const member of member_data) {
|
||||||
let nickname: string;
|
let nickname: string;
|
||||||
try {
|
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) {
|
} catch (e) {
|
||||||
nickname = ``;
|
nickname = ``;
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,9 +73,10 @@ export default {
|
||||||
content: "`에러`: 해당 멤버는 등록되지 않았어요!",
|
content: "`에러`: 해당 멤버는 등록되지 않았어요!",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let text = "";
|
let text = "";
|
||||||
text += (await interaction.guild.members.fetch(discord_id)).nickname;
|
text +=
|
||||||
|
(await interaction.guild.members.fetch(discord_id)).nickname ||
|
||||||
|
interaction.user.username;
|
||||||
text += ": ";
|
text += ": ";
|
||||||
for (const user of the_datas.docs) {
|
for (const user of the_datas.docs) {
|
||||||
const minecraft_uuid = user.data()["minecraft_uuid"];
|
const minecraft_uuid = user.data()["minecraft_uuid"];
|
||||||
|
|
Loading…
Reference in a new issue