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

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