How to check if the bot has Permission X inside of the server? For example VIEW_AUDIT_LOG
In a listener
7 Replies
discord-js.utilities has some nice methods but none to check if the audit log permission is there (havent checked fully tho)
I would think
guild.me.permissions.has(...)
^
also this is a #discordjs-support question, not sapphire
ah, sorry thought it gets solved with a sapphire plugin
i tried this befor but me does not exist on guild
guild.me
was moved to guild.members.me
in Discord.js v14.Documentation suggestion for @Chillihero:
<:_:898645159934316565> Permissions#has()
Checks whether the bitfield has a permission, or multiple permissions.