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
!(
await members
.where("minecraft_uuid", "==", mcuuid) .where("minecraft_uuid", "==", mcuuid)
.where("discord_id", "==", discord_id) .where("discord_id", "==", discord_id)
.get() .get();
).empty if (!the_member.empty) {
) { the_member.forEach((member) => {
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);