diff --git a/commands/Tickets/closeticket.js b/commands/Tickets/closeticket.js index 4e564c5e..3bf04b17 100644 --- a/commands/Tickets/closeticket.js +++ b/commands/Tickets/closeticket.js @@ -112,7 +112,8 @@ class CloseTicket extends BaseCommand { await interaction.reply({ content: interaction.translate("misc:CANT_DM"), ephemeral: true }); } - await interaction.channel.permissionOverwrites.edit(interaction.member, { ViewChannel: false, SendMessages: null }); + const member = interaction.guild.members.cache.find(u => u.user.username === interaction.channel.name.split("-")[0]); + await interaction.channel.permissionOverwrites.edit(member, { ViewChannel: false, SendMessages: null }); await interaction.channel.setName(`${interaction.channel.name}-closed`); } }); diff --git a/commands/Tickets/createticketembed.js b/commands/Tickets/createticketembed.js index 9aee9a61..79aa9687 100644 --- a/commands/Tickets/createticketembed.js +++ b/commands/Tickets/createticketembed.js @@ -167,7 +167,8 @@ class CreateTicketEmbed extends BaseCommand { await interaction.reply({ content: interaction.translate("misc:CANT_DM"), ephemeral: true }); } - await interaction.channel.permissionOverwrites.edit(interaction.member, { ViewChannel: false, SendMessages: null }); + const member = interaction.guild.members.cache.find(u => u.user.username === interaction.channel.name.split("-")[0]); + await interaction.channel.permissionOverwrites.edit(member, { ViewChannel: false, SendMessages: null }); await interaction.channel.setName(`${interaction.channel.name}-closed`); } });