Checking bot permissions in a channel
Do it with permissions.has()?
5 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
<GuildChannel>.permissionsFor(guild.members.me).has(...)
Thank you
RangeError [BitFieldInvalid]: Invalid bitfield flag or number: SEND_MESSAGES.
Tag suggestion for @emsa001:
RangeError [BitFieldInvalid]: Invalid bitfield flag or number: undefined
• All SCREAMING_SNAKE_CASE
enums have been changed to PascalCase
• Intents: Intents.FLAGS.GUILD_MESSAGES
-> GatewayIntentBits.GuildMessages
• Permissions: Permissions.FLAGS.SEND_MESSAGES
-> PermissionFlagsBits.SendMessages