hi, why with this code i have this error ? (sorry for my english im french)
module.exports = {
description: "Verouille le salon",
permissions: ["ManageChannels"],
async run({ client, interaction }) {
try {
interaction.channel.permissionOverwrites.edit(interaction.guild.roles.everyone, {
SendMessages: false
})
} catch {
await interaction.reply({ content: `Je ne peux pas verouiller le salon`, ephemeral: true })
}
// try {
const name = interaction.channel.name
const newName = `🔒 ${name}`
console.log(newName, typeof newName)
// const channel = await interaction.guild.channels.fetch(interaction.channel.id)
interaction.channel.setName({ name: newName })
// } catch {}
await interaction.reply({ content: `Le salon a bien été verouillé`, ephemeral: false })
}
}```