TypeError [INVALID_TYPE] Supplied parameter is not a User nor a Role.
This error occurs when I'm using TextChannel.permissionsOverwrite.set()
13 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Here's the code
One of those isnt a valid id
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
member.guild.id is a Guild ID, but it is also the Role ID for @ everyone
Log the values
I did logged it
And use <@&>
And <@>
To double checked, all are valid
This also happens at very random timing
Wdym random timing
It works like 50% of the time
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 itOh hm
When I log it, I don't see undefined though
I see
But do you log it when it errors?
Okay, I do see what you mean now.
It works when I picked another value