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

238
Visualizações
TypeError [INVALID_TYPE]: Supplied parameter is not a User nor a Role. But role is certainly supplied. Discorcd.js V13

So i am making a ticket system and i need a certain role to be able to look in the newly created channel but it keeps complaining i didn't supply a role even though i most definitely did.

I have tried the following:

await interaction.guild.roles.fetch()
let helperrol = await interaction.guild.roles.cache.find(role => role.id === 
       rolesAndChannels.helperRol);
let modrol = await interaction.guild.roles.cache.find(role => role.id === 
       rolesAndChannels.moderatorRol);

await interaction.guild.channels.create(kanaalmaaknaam, {
                type: 'text',
                parent: rolesAndChannels.ticketCatagorie,
                permissionOverwrites: [{
                    id: interaction.guild.id,
                    deny: ['VIEW_CHANNEL', 'SEND_MESSAGES'],
                },
                    {
                        id: interaction.user.id,
                        allow: ['VIEW_CHANNEL', 'SEND_MESSAGES'],
                    },
                    {
                        id: helperrol,
                        allow: ['VIEW_CHANNEL', 'SEND_MESSAGES'],
                    },
                    {
                        id: modrol,
                        allow: ['VIEW_CHANNEL', 'SEND_MESSAGES'],
                    },
                ],
            }).catch('Er is een fout opgetreden bij het maken van het text kanaal');

But I still get the error.

I have tried:

{
                        id: rolesAndChannels.moderatorRol,
                        allow: ['VIEW_CHANNEL', 'SEND_MESSAGES'],
                    },

Where rolesAndChannels.moderatorRol is the roleID but that results in the same error.

I have also tried to just supply the roleID directly but still same error.

I have enabled the partials intent if that's important.

Its a slash command.

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

0

The awnser was that I somehow copied the wrong ID's of the roles or something. I recopied the role ID's from the settings menu and that fixed the error.

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