diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index 75f079dd..813db345 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -194,8 +194,8 @@ export default class InteractionCreateEvent extends BaseEvent { } }); - interaction.values.forEach((value) => { - (interaction.channel as GuildChannel | null)?.permissionOverwrites.delete(value).catch((e) => console.log(e)); + for (const value of interaction.values) { + await (interaction.channel as GuildChannel | null)?.permissionOverwrites.delete(value).catch((e) => console.log(e)); log( { @@ -209,7 +209,7 @@ export default class InteractionCreateEvent extends BaseEvent { }, this.client ); - }); + }; interaction .update({ diff --git a/src/utils/createTicket.ts b/src/utils/createTicket.ts index a8bf7622..414cebe9 100644 --- a/src/utils/createTicket.ts +++ b/src/utils/createTicket.ts @@ -86,7 +86,7 @@ export const createTicket = async (interaction: StringSelectMenuInteraction | Mo .catch((e) => console.log(e)); if (client.config.rolesWhoHaveAccessToTheTickets.length > 0) { - client.config.rolesWhoHaveAccessToTheTickets.forEach(async (role) => { + for (const role of client.config.rolesWhoHaveAccessToTheTickets) { await channel.permissionOverwrites .edit(role, { SendMessages: true, @@ -96,7 +96,7 @@ export const createTicket = async (interaction: StringSelectMenuInteraction | Mo ViewChannel: true, }) .catch((e) => console.log(e)); - }); + }; } const footer = locale.getSubValue("embeds", "ticketOpened", "footer", "text").replace("ticket.pm", ""); if(ticketType.color?.toString().trim() === "") ticketType.color = undefined;