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
nodejs@1.0.0 /home/runner/rgsbro └── discord.js@13.16.0 node js v20.3.1
22 Replies
d.js toolkit
d.js toolkit10mo 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
-͟͟͞ 𝐒𝐏〆 spBripyalt
nodejs@1.0.0 /home/runner/rgsbro └── discord.js@13.16.0 node js v20.3.1
treble/luna
treble/luna10mo ago
show your code
d.js docs
d.js docs10mo ago
To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.
treble/luna
treble/luna10mo ago
!
-͟͟͞ 𝐒𝐏〆 spBripyalt
what wdym
treble/luna
treble/luna10mo ago
read the tag
treble/luna
treble/luna10mo ago
what i'm guessing is that your cache one is failing also
treble/luna
treble/luna10mo ago
.cache.get(id) exists
Want results from more Discord servers?
Add your server