Creation of a channel and adds a role to this channel
Hello!
Sometimes, not always, when my bot creates a new channel for a ticket system, it doesn't add the role configured in my ticket system, but in the audit logs, it appears.
Do you have any idea why ?
Thank you
8 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 OPCode
Sometimes it works, sometimes not
Why dont you put it inside the permissionOverwrites?
Why do you make a separated call for that role, instead of putting it along with the everyone role and the user
It's not a problem to put it inside permissionOverwrites if the roleId can be null ?
You can check if its null before adding it to the array though
Yes why not, I will try
Thank you
Same problem, it appears in the log, but not on the channel permissions, maybe a bug from discord because it works perfectly before and I haven't change anything
edit : I have added the type for each permissionOverwrites and it works again 👍