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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Hax
HaxOP3y ago
Here's the code
Parogo_72
Parogo_723y ago
One of those isnt a valid id
Hax
HaxOP3y ago
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
Parogo_72
Parogo_723y ago
Log the values
Hax
HaxOP3y ago
I did logged it And use <@&> And <@> To double checked, all are valid This also happens at very random timing
Parogo_72
Parogo_723y ago
Wdym random timing
Hax
HaxOP3y ago
It works like 50% of the time
Parogo_72
Parogo_723y ago
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
Hax
HaxOP3y ago
Oh hm When I log it, I don't see undefined though I see
Parogo_72
Parogo_723y ago
But do you log it when it errors?
Hax
HaxOP3y ago
Okay, I do see what you mean now. It works when I picked another value
Want results from more Discord servers?
Add your server