get channel permission for user
is it possible to check if user has a certain permission in channel for example
9 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 staff PermissionOverwriteManager (extends CachedManager)
Manages API methods for guild channel permission overwrites and stores their cache.
@wolvinny🌈 sorry I didn't understand that clearly
<TextChannel>.permissionOverwrites returns a PermissionOverwriteManager
after caching it
deny: PermissionsBitField { bitfield: 2097152n }
that's how I got it, how to check if the disabled permission was Speak
or something else@wolvinny🌈 I could get the bitfild through
<TextChannel>.permissionOverwrites.cache.get(id).deny.bitfield
but after this I'm confused how to turn it to array.deny.toArray()
Thanks a lot ❤️