I'm trying to make a ticket system, that when I click on the button, it changes the channel category and removes the member's permission to see it. When I click the button, it changes the category but doesn't change the channel's permission. I've already looked in the docs, and I haven't found anything.
the error:
C:\Users\whash\OneDrive\Documentos\optipc_bot_beta_sem_erro\events\ticket\suporte.js:187
interaction.channel.permissionOverwrites(subTicketSuporte.userId, {deny: Permissions.FLAGS.VIEW_CHANNEL})
^
TypeError: interaction.channel.permissionOverwrites is not a function
at Client.<anonymous> (C:\Users\whash\OneDrive\Documentos\optipc_bot_beta_sem_erro\events\ticket\suporte.js:187:29)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Database:
my code:
const {
MessageActionRow,
MessageButton,
MessageEmbed,
MessageSelectMenu,
Permissions,
} = require("discord.js");
const firebase = require("firebase");
const db = firebase.database();
const client = require("../../index");
client.on("interactionCreate", async (interaction) => {
if (interaction.isCommand()) return;
interaction.deferUpdate();
// ROWS //
const rowDelChannel = new MessageActionRow().addComponents(
new MessageButton()
.setStyle("DANGER")
.setLabel("