Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

337
Visualizações
Does anyone know how to create and delete a category with channels in Discord.js?

I am trying to get my discord bot to create a category that has 3 distinct channels, each with different permissions. I would also like a way to delete this category entirely at the end of my code. Any idea on how to do it?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

There are multiple ways to do it. Here are 3 of them:

Putting parent in channel create options:

guild.channels.create("chan-name", {
  parent: "123456789012345678" // the ID of the category channel
})

Using CategoryChannel#createChannel()

category.createChannel("chan-name")

And lastly, not recommended though, is assigning after creation. It's not recommended as it does 2 API requests rather than 1

let channel = await guild.channels.create("chan-name")
channel.setParent("category-id")
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda