#TypeError [INVALID_TYPE] Supplied parameter is not a User nor a Role.

27 messages · Page 1 of 1 (latest)

silk jackal
#

This error occurs when I'm using TextChannel.permissionsOverwrite.set()

sharp sage
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

silk jackal
#

Here's the code

uncut vector
#

One of those isnt a valid id

silk jackal
#

Yes, that's my thought at first

#

But I double checked and all are valid

#

ticketcreator is a User ID

#

interaction.values[0] is a Role ID

uncut vector
#

Log the values

silk jackal
#

I did logged it

#

And use <@&>

#

And <@>

#

To double checked, all are valid

#

This also happens at very random timing

uncut vector
#

Wdym random timing

silk jackal
#

It works like 50% of the time

uncut vector
#

My guess is that interaction.values[0] is the issue

#

Since you can unselect things from a select menu

#

Making it undefined

#

You should make the array outside the .set and check the values before pushing the elements to it

silk jackal
#

When I log it, I don't see undefined though

uncut vector
silk jackal
#

Okay, I do see what you mean now.