Discordjs package Check permission
In the discord.js package, how do I check if, for example, permission '1032' is Administrator? I didn't find anything that tells me this in the package version.
5 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!:class: PermissionsBitField
@14.16.2
Data structure that makes it easy to interact with a permission bitfield. All GuildMembers have a set of permissions in their guild, and each channel in the guild may also have PermissionOverwrites for the member that override their default permissions.This has several methods you could utilize - has, serialize etc
😦
This is not discord.js. this is
@discordjs/core
. You have to use a third-party library, such as @sapphire/bitfield