How to check if the bot has Permission X inside of the server? For example VIEW_AUDIT_LOG

In a listener
7 Replies
chillihero
chilliheroOP3y ago
discord-js.utilities has some nice methods but none to check if the audit log permission is there (havent checked fully tho)
Lioness100
Lioness1003y ago
I would think guild.me.permissions.has(...)
Favna
Favna3y ago
^ also this is a #discordjs-support question, not sapphire
chillihero
chilliheroOP3y ago
ah, sorry thought it gets solved with a sapphire plugin
chillihero
chilliheroOP3y ago
i tried this befor but me does not exist on guild
Fozzie
Fozzie3y ago
guild.me was moved to guild.members.me in Discord.js v14.
Spinel
Spinel3y ago
Documentation suggestion for @Chillihero: <:_:898645159934316565> Permissions#has() Checks whether the bitfield has a permission, or multiple permissions.

Did you find this page helpful?