11 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!Tried that and still gave me this:
Unhandled Rejection at: Promise {
<rejected> TypeError: Cannot read properties of undefined (reading 'cache')
at E:\Bot_Development\TeamBG4.2\src\commands\Moderation\clone.js:46:73
at _Collection.forEach (<anonymous>)
at Object.execute (E:\Bot_Development\TeamBG4.2\src\commands\Moderation\clone.js:45:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (E:\Bot_Development\TeamBG4.2\src\events\interactionCreate.js:15:13)
} reason: TypeError: Cannot read properties of undefined (reading 'cache')
at E:\Bot_Development\TeamBG4.2\src\commands\Moderation\clone.js:46:73
at _Collection.forEach (<anonymous>)
at Object.execute (E:\Bot_Development\TeamBG4.2\src\commands\Moderation\clone.js:45:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (E:\Bot_Development\TeamBG4.2\src\events\interactionCreate.js:15:13)
log channel
thats the one
i was thingking which ones didnt have overwrites
There are no threads in the channel in question. Plus I think that my handler for finding if there are overwrites present should accommodate that correct?
I still don't know what you mean by that
console: log() static method
The console.log() static method outputs a message to the console. The message may be a single string (with optional substitution values), or it may be any one or more JavaScript objects.
but your issue probably is waht qjuh mentioned
So filter by channel type of text, voice, stage, forum, announcement, and category
just check if the channel has permissionOverwrites
I thought it already does that?
Doesn't it?
if it did you wouldnt have this issue
it would make no sense to filter everything separately if you can just check for permissionOverwrites being present or not
Now I'm getting this:
Unhandled Rejection at: Promise {
<rejected> TypeError [InvalidType]: Supplied overwrites is not an Array or Collection of Permission Overwrites.
at PermissionOverwriteManager.set (E:\Bot_Development\TeamBG4.2\node_modules\discord.js\src\managers\PermissionOverwriteManager.js:68:9)
at E:\Bot_Development\TeamBG4.2\src\commands\Moderation\clone.js:49:56
at _Collection.forEach (<anonymous>)
at Object.execute (E:\Bot_Development\TeamBG4.2\src\commands\Moderation\clone.js:45:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (E:\Bot_Development\TeamBG4.2\src\events\interactionCreate.js:15:13) {
code: 'InvalidType'
}
} reason: TypeError [InvalidType]: Supplied overwrites is not an Array or Collection of Permission Overwrites.
at PermissionOverwriteManager.set (E:\Bot_Development\TeamBG4.2\node_modules\discord.js\src\managers\PermissionOverwriteManager.js:68:9)
at E:\Bot_Development\TeamBG4.2\src\commands\Moderation\clone.js:49:56
at _Collection.forEach (<anonymous>)
at Object.execute (E:\Bot_Development\TeamBG4.2\src\commands\Moderation\clone.js:45:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (E:\Bot_Development\TeamBG4.2\src\events\interactionCreate.js:15:13) {
code: 'InvalidType'
}