Skip to content

Commit

Permalink
Add permissions asynchronously to avoid bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayrix authored Aug 15, 2023
1 parent 6823f11 commit 75f92f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/createTicket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const createTicket = async (interaction: StringSelectMenuInteraction | Mo
// Client.db is set here and incremented ticket count
ticketCount++;

channel.permissionOverwrites
await channel.permissionOverwrites
.edit(interaction.user, {
SendMessages: true,
AddReactions: true,
Expand All @@ -87,7 +87,7 @@ export const createTicket = async (interaction: StringSelectMenuInteraction | Mo

if (client.config.rolesWhoHaveAccessToTheTickets.length > 0) {
client.config.rolesWhoHaveAccessToTheTickets.forEach(async (role) => {
channel.permissionOverwrites
await channel.permissionOverwrites
.edit(role, {
SendMessages: true,
AddReactions: true,
Expand Down

0 comments on commit 75f92f4

Please sign in to comment.