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

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

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 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!