fix del_nick_super not deleting nickname

This commit is contained in:
kdh8219 2023-04-29 00:40:52 +09:00
parent 612e7eb601
commit 5a7658a34f

View file

@ -40,14 +40,15 @@ export default {
return; return;
} }
const members = firebase.collection("members"); const members = firebase.collection("members");
if ( const the_member = await members
!( .where("minecraft_uuid", "==", mcuuid)
await members .where("discord_id", "==", discord_id)
.where("minecraft_uuid", "==", mcuuid) .get();
.where("discord_id", "==", discord_id) if (!the_member.empty) {
.get() the_member.forEach((member) => {
).empty members.doc(member.id).delete();
) { });
let discord_tag; let discord_tag;
try { try {
const discord_user = await interaction.client.users.fetch(discord_id); const discord_user = await interaction.client.users.fetch(discord_id);