This commit is contained in:
Jonny_Bro (Nikita) 2023-08-08 22:22:06 +05:00
parent eb934a37c3
commit e8a7d9670f
No known key found for this signature in database
GPG key ID: 28B0D27F8DD5A4C9
2 changed files with 4 additions and 2 deletions

View file

@ -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`);
}
});

View file

@ -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`);
}
});