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

492
Vistas
discord.js - TypeError [INVALID_TYPE]: Supplied parameter is not a User nor a Role

If I press the button, the following error occurs: TypeError [INVALID_TYPE]: Supplied parameter is not a User nor a Role. However, I can also put a solid id there and this error still occurs.

button.guild.channels.create('cs', {
            type: "text",
            parent_id: '802172599836213258',
            permissionOverwrites: [
               {
                 id: button.guild.roles.everyone,
                 deny: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
               },
               {
                id: button.clicker.id,
                allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
              }
            ]
          })
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The only possible problem I can see is the button.guild.roles.everyone, there's no everyone property in button.guild.roles, the everyone id is the guild id, so if you replace button.guild.roles.everyone with button.guild.id, it should fix the problem.

button.guild.channels.create('cs', {
  type: "text",
  parent_id: '802172599836213258',
  permissionOverwrites: [
    {
      id: button.guild.id,
      deny: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
    },
    {
      id: button.clicker.id,
      allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
    }
  ]
})
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