add await
This commit is contained in:
parent
08569c1b41
commit
eea6bb1316
|
@ -17,6 +17,6 @@ export default {
|
|||
async execute(interaction: ChatInputCommandInteraction) {
|
||||
const discord_id = interaction.user.id;
|
||||
const mcid = interaction.options.getString("minecraft_id") as string;
|
||||
add_user(interaction, discord_id, mcid, mojangAPI, firebase);
|
||||
await add_user(interaction, discord_id, mcid, mojangAPI, firebase);
|
||||
},
|
||||
};
|
||||
|
|
|
@ -29,6 +29,6 @@ export default {
|
|||
async execute(interaction: ChatInputCommandInteraction) {
|
||||
const discord_id = interaction.options.getUser("discord")?.id as string;
|
||||
const mcid = interaction.options.getString("minecraft_id") as string;
|
||||
add_user(interaction, discord_id, mcid, mojangAPI, firebase);
|
||||
await add_user(interaction, discord_id, mcid, mojangAPI, firebase);
|
||||
},
|
||||
};
|
||||
|
|
|
@ -28,7 +28,7 @@ client.once(Events.ClientReady, async (event) => {
|
|||
try {
|
||||
await guild.members.fetch(data.discord_id);
|
||||
} catch {
|
||||
doc.ref.delete();
|
||||
await doc.ref.delete();
|
||||
await send_embed(client, process.env.LOG_CHANNEL_ID, [
|
||||
new EmbedBuilder()
|
||||
.setTitle("Auto Removed")
|
||||
|
@ -78,7 +78,7 @@ client.on(Events.GuildMemberRemove, async (interaction) => {
|
|||
.get();
|
||||
for (const doc of exited_user.docs) {
|
||||
const data = doc.data() as TUser;
|
||||
doc.ref.delete();
|
||||
await doc.ref.delete();
|
||||
await send_embed(client, process.env.LOG_CHANNEL_ID, [
|
||||
new EmbedBuilder()
|
||||
.setTitle("Auto Removed")
|
||||
|
|
|
@ -24,7 +24,7 @@ export class MojangAPI {
|
|||
|
||||
const get_by_id = await this.firestore.where("id", "==", id).get();
|
||||
get_by_id.forEach((doc) => doc.ref.delete());
|
||||
this.firestore.add({ uuid: minecraft_uuid, id: id });
|
||||
await this.firestore.add({ uuid: minecraft_uuid, id: id });
|
||||
|
||||
this.cache.remove_by_second(id);
|
||||
this.cache.set_by_first(minecraft_uuid, id);
|
||||
|
@ -43,7 +43,7 @@ export class MojangAPI {
|
|||
|
||||
const get_by_uuid = await this.firestore.where("uuid", "==", uuid).get();
|
||||
get_by_uuid.forEach((doc) => doc.ref.delete());
|
||||
this.firestore.add({ uuid: uuid, id: minecraft_id });
|
||||
await this.firestore.add({ uuid: uuid, id: minecraft_id });
|
||||
|
||||
this.cache.remove_by_first(uuid);
|
||||
this.cache.set_by_second(uuid, minecraft_id);
|
||||
|
|
Loading…
Reference in a new issue