This commit is contained in:
Jonny_Bro (Nikita) 2023-08-16 20:46:27 +05:00
parent d61d8e28df
commit e5dcf03f95

View file

@ -112,7 +112,7 @@ class CloseTicket extends BaseCommand {
await interaction.reply({ content: interaction.translate("misc:CANT_DM"), ephemeral: true }); await interaction.reply({ content: interaction.translate("misc:CANT_DM"), ephemeral: true });
} }
const member = interaction.guild.members.cache.find(u => u.user.username === interaction.channel.name.split("-")[0]); const member = interaction.guild.members.cache.find(u => u.user.username.includes(interaction.channel.name.split("-")[0]));
await interaction.channel.permissionOverwrites.edit(member, { ViewChannel: false, SendMessages: null }); await interaction.channel.permissionOverwrites.edit(member, { ViewChannel: false, SendMessages: null });
await interaction.channel.setName(`${interaction.channel.name}-closed`); await interaction.channel.setName(`${interaction.channel.name}-closed`);
} }