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;
}
const members = firebase.collection("members");
if (
!(
await members
.where("minecraft_uuid", "==", mcuuid)
.where("discord_id", "==", discord_id)
.get()
).empty
) {
const the_member = await members
.where("minecraft_uuid", "==", mcuuid)
.where("discord_id", "==", discord_id)
.get();
if (!the_member.empty) {
the_member.forEach((member) => {
members.doc(member.id).delete();
});
let discord_tag;
try {
const discord_user = await interaction.client.users.fetch(discord_id);