Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

154
Vistas
Channel permissionOverwrites

For some reason whenever I assign permission overwrites for @everyone when making a channel it doesn't actually do the overwrites I select.

    if (!interaction.isButton()) return
    if (interaction.customId === 'ticketcreate') 
            {
                
                const ticketCreation = await interaction.guild.channels.create(interaction.user.username + ' ticket', { //Create ticket channel
                    type: 'GUILD_TEXT',
                    permissionOverwrites: [
                        {
                            id: interaction.user.id,
                            allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES"]
                        },
                        {
                            id: interaction.guild.roles.everyone,
                            deny: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY"]
                        }
                    ],
                })

So this should make everyone in the guild not be able to view the channel or read message history and make the person that interacted with the button view the channel and read message history. However it doesn't do this. (this button creates a support ticket and I don't want everyone to be able to see the support ticket for obvious reasons)

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

you're passing in strings for the permissions...I believe the docs say this should be bitfield flags...here's the specs:

https://discord.js.org/#/docs/discord.js/stable/class/GuildChannelManager?scrollTo=create

and the example listed shows the code example too:

deny: [Permissions.FLAGS.VIEW_CHANNEL],

info from discordjs on Permissions: https://discordjs.guide/popular-topics/permissions.html#terminology

scroll down to Base permissions #Setting role permissions

guild.channels.create('new-channel', {
    type: 'GUILD_TEXT',
    permissionOverwrites: [
        {
            id: message.guild.id,
            deny: [Permissions.FLAGS.VIEW_CHANNEL],
        },
        {
            id: message.author.id,
            allow: [Permissions.FLAGS.VIEW_CHANNEL],
        },
    ],
});```
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda