error

getting an error
/home/runner/rgsbro/node_modules/discord.js/src/structures/PermissionOverwrites.js:184
if (!userOrRole) throw new TypeError('INVALID_TYPE', 'parameter', 'User nor a Role');
^

TypeError [INVALID_TYPE]: Supplied parameter is not a User nor a Role.
at PermissionOverwrites.resolve (/home/runner/rgsbro/node_modules/discord.js/src/structures/PermissionOverwrites.js:184:28)
at /home/runner/rgsbro/node_modules/discord.js/src/managers/GuildChannelManager.js:157:81
at Array.map (<anonymous>)
at GuildChannelManager.create (/home/runner/rgsbro/node_modules/discord.js/src/managers/GuildChannelManager.js:157:51)
at Client.<anonymous> (/home/runner/rgsbro/index.js:106:28)
at Client.emit (node:events:523:35)
at MessageCreateAction.handle (/home/runner/rgsbro/node_modules/discord.js/src/client/actions/MessageCreate.js:26:14)
at module.exports [as MESSAGE_CREATE] (/home/runner/rgsbro/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/runner/rgsbro/node_modules/discord.js/src/client/websocket/WebSocketManager.js:346:31)
at WebSocketShard.onPacket (/home/runner/rgsbro/node_modules/discord.js/src/client/websocket/WebSocketShard.js:493:22) {
[Symbol(code)]: 'INVALID_TYPE'
}

Node.js v20.3.1
/home/runner/rgsbro/node_modules/discord.js/src/structures/PermissionOverwrites.js:184
if (!userOrRole) throw new TypeError('INVALID_TYPE', 'parameter', 'User nor a Role');
^

TypeError [INVALID_TYPE]: Supplied parameter is not a User nor a Role.
at PermissionOverwrites.resolve (/home/runner/rgsbro/node_modules/discord.js/src/structures/PermissionOverwrites.js:184:28)
at /home/runner/rgsbro/node_modules/discord.js/src/managers/GuildChannelManager.js:157:81
at Array.map (<anonymous>)
at GuildChannelManager.create (/home/runner/rgsbro/node_modules/discord.js/src/managers/GuildChannelManager.js:157:51)
at Client.<anonymous> (/home/runner/rgsbro/index.js:106:28)
at Client.emit (node:events:523:35)
at MessageCreateAction.handle (/home/runner/rgsbro/node_modules/discord.js/src/client/actions/MessageCreate.js:26:14)
at module.exports [as MESSAGE_CREATE] (/home/runner/rgsbro/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/runner/rgsbro/node_modules/discord.js/src/client/websocket/WebSocketManager.js:346:31)
at WebSocketShard.onPacket (/home/runner/rgsbro/node_modules/discord.js/src/client/websocket/WebSocketShard.js:493:22) {
[Symbol(code)]: 'INVALID_TYPE'
}

Node.js v20.3.1
as
1 Reply
d.js toolkit
d.js toolkit7mo 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