TypeError [InvalidType]: Supplied parameter is not a User nor a Role.
VoiceStateUpdate Event.
3 Replies
- 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 OPTypeError [InvalidType]: Supplied parameter is not a User nor a Role.
at PermissionOverwrites.resolve (C:\Users\WORK\Desktop\asagi-assistant-develop\node_modules\discord.js\src\structures\PermissionOverwrites.js:184:28)
at C:\Users\WORK\Desktop\asagi-assistant-develop\node_modules\discord.js\src\managers\GuildChannelManager.js:169:89
at Array.map (<anonymous>)
at GuildChannelManager.create (C:\Users\WORK\Desktop\asagi-assistant-develop\node_modules\discord.js\src\managers\GuildChannelManager.js:169:51)
at handleCreateRoom (file:///C:/Users/WORK/Desktop/asagi-assistant-develop/src/events/handles/privateRooms/handleCreateRoom.js:387:71)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Client.<anonymous> (file:///C:/Users/WORK/Desktop/asagi-assistant-develop/src/events/voice/onVoiceStateUpdate.js:38:9) {
code: 'InvalidType'
}
console.log(trustedUsers)
[ '1125484017593090239' ]
console.log(permissionOverwrites)
[
{ id: '440407587037642783', allow: [ 1048576n, 1024n, 2048n ] },
{ id: '1129790184699985971', deny: [] },
{ id: '1125484017593090239', allow: [ 1048576n, 1024n, 2048n ] },
{ id: null, deny: [ 1048576n, 1024n, 2048n ] }
]
The user is on the server.
your last permission overwrite has
null
as the id, hence why its erroring
one of your entries in the array is null