isPermissionInBitfield := is_permission_in_bitfield(Args{permission_integer: 104324673, permission_name: "Manage Roles"})
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Has Permission: " + isPermissionInBitfield.has_permission,
})
Inputs
Permission IntegerRequired
Bitfield integer representing permissions.
Example: 104324673
Permission NameRequired
Name of the permission to check.
OptionsAdd ReactionsAdministratorAttach FilesBan MembersBypass SlowmodeChange NicknameConnectCreate EventsCreate ExpressionsCreate Instant InviteCreate Private ThreadsCreate Public ThreadsDeafen MembersEmbed LinksKick MembersManage ChannelsManage EventsManage ExpressionsManage MessagesManage NicknamesManage RolesManage ServerManage ThreadsManage WebhooksMention EveryoneMove MembersMute MembersPin MessagesPriority SpeakerRead Message HistoryRequest to SpeakSend MessagesSend Messages in ThreadsSend PollsSend TTS MessagesSend Voice MessagesSet Voice Channel StatusSpeakStreamTimeout MembersUse Application CommandsUse Embedded ActivitiesUse External AppsUse External EmojisUse External SoundsUse External StickersUse SoundboardUse VADView Audit LogView ChannelView Creator Monetization AnalyticsView Guild Insights
Outputs
Has Permission
Whether the bitfield contains the permission.
Example: true
Build a bot using blocks like Check Permission
Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
ID:
is_permission_in_bitfieldInputs
| Field | InventScript name | Value |
|---|---|---|
| Permission Integer | permission_integer | e.g. "104324673" |
| Permission Name | permission_name | "Add Reactions", "Administrator", "Attach Files", "Ban Members", "Bypass Slowmode", "Change Nickname", "Connect", "Create Events", "Create Expressions", "Create Instant Invite", "Create Private Threads", "Create Public Threads", "Deafen Members", "Embed Links", "Kick Members", "Manage Channels", "Manage Events", "Manage Expressions", "Manage Messages", "Manage Nicknames", "Manage Roles", "Manage Server", "Manage Threads", "Manage Webhooks", "Mention Everyone", "Move Members", "Mute Members", "Pin Messages", "Priority Speaker", "Read Message History", "Request to Speak", "Send Messages", "Send Messages in Threads", "Send Polls", "Send TTS Messages", "Send Voice Messages", "Set Voice Channel Status", "Speak", "Stream", "Timeout Members", "Use Application Commands", "Use Embedded Activities", "Use External Apps", "Use External Emojis", "Use External Sounds", "Use External Stickers", "Use Soundboard", "Use VAD", "View Audit Log", "View Channel", "View Creator Monetization Analytics", "View Guild Insights" |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Has Permission | has_permission | e.g. "true" |
Example InventScript
More utilities blocks
Log ErrorLog an error to the errors dashboard.Get Error DetailsRetrieve details of a logged error.Discord API PingMeasure current patency to the Discord API.Change Bot StatusUpdate the bot's presence and status text.Get Server CountGet the number of servers the bot is in.Custom LoopLoop over a customized range of numbers.Member/Role Has PermissionsCheck if a member or role has specific permissions.Redact SecretRedact a secret (e.g. example -> e*****e).Get Bot DetailsGet cached details of the current branch's bot user.Generate Snowflake IDGenerate a unique Snowflake-like ID.Update Local VariableSet a local variable to a new value.Append New Line to Local VariableAppend text to a local variable on a new line.CommentAdd a note or comment to your flow. This block does nothing when run.Increment or Decrement Local VariableIncrement or decrement a numeric local variable by a value.