permissionOverwrites on a new channel

so i was creating a ticket system, and when a ticket is made, a channel is made based by the ticket. the problem is: whenever i try to make it so that only the one who made the ticket can see the channel and no one else can, it doesn't work i've even tried putting as the type OverwriteTypes.Role but it still doesn't work
No description
No description
No description
No description
17 Replies
d.js toolkit
d.js toolkit•5d 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!
Nab Heyka
Nab Heyka•5d ago
node version: v20.17.0
souji
souji•5d ago
how does "doesn't work" manifest?
Nab Heyka
Nab Heyka•5d ago
[email protected] like it's not denying the permission to view the channel
souji
souji•5d ago
you are sure that you saved your code before you ran it?
Nab Heyka
Nab Heyka•5d ago
yes i'm sure very sure
souji
souji•5d ago
oh, duh type member, but guild.id is the at-everyone role id
Nab Heyka
Nab Heyka•5d ago
i've even tried the role type doesn't work either
souji
souji•5d ago
just omit the type
Nab Heyka
Nab Heyka•5d ago
let me try again with myself this time
souji
souji•5d ago
well, i just tried, both without and with role specified explicitly it worked, with member it did not
Nab Heyka
Nab Heyka•5d ago
still don't work
No description
No description
NyR
NyR•5d ago
it's because you are setting the parent channel after you create it using setParent, the method locks the permission to the category by default, just pass the parentId when creating the channel
Nab Heyka
Nab Heyka•5d ago
oh i didn't know that thank you sir ok yeah that was the issue thanks
souji
souji•5d ago
so 1) that default is fluffed up has been the case since 2017 tho so then i tried to understand why i never ran into this - the answer is: i never use it. which begs the question: why do you even move it? you can also specify a parent in the #create call
d.js docs
d.js docs•5d ago
:interface: GuildChannelCreateOptions @14.16.3 Options used to create a new channel in a guild.
souji
souji•5d ago
parent key
Want results from more Discord servers?
Add your server