Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!