"Supplied parameter is not a User nor a Role", but it is?

I'm running this code:
// Make Visible to Claimant Only
await channel.permissionOverwrites.create([
{ // Staff Member Who Claimed
id: interaction.user.id,
allow: [PermissionsBitField.Flags.ViewChannel],
type: OverwriteType.Member
}
])
// Make Visible to Claimant Only
await channel.permissionOverwrites.create([
{ // Staff Member Who Claimed
id: interaction.user.id,
allow: [PermissionsBitField.Flags.ViewChannel],
type: OverwriteType.Member
}
])
However I get the error: TypeError [InvalidType]: Supplied parameter is not a User nor a Role. It is inside of an interaction code, and console.logging the interaction.user.id is COMPLETELY valid, I've even tried removing it from the array. Why am I getting this error for a valid User/role?
1 Reply
d.js toolkit
d.js toolkit15mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Want results from more Discord servers?
Add your server