Permissions
Permissions are Discord's bitfields, as decimal strings, everywhere: roles, overwrites, the
invite link's permissions. Voicaw's permissions are fewer than Discord's, so
each of Voicaw's has a Discord bit, and some of Discord's come with another one.
How a bot's permissions work
As anyone's in a guild: @everyone's permissions plus those of the bot's roles (its own role and any it's given). Administrator, or owning the guild, means everything. In a channel, the overwrites apply in Discord's order: @everyone's, then the roles' (denies, then allows), then the member's own. In a thread, Send Messages in Threads stands in for Send Messages.
On top of permissions, a bot only reaches below its own highest role: it can't edit, give or delete roles at or above it, or kick, ban or change the roles of members ranked as high, and it can't give out permissions it doesn't have itself. Move its role up in the guild's settings to let it manage more.
The bits
| Bit | Discord's name | On Voicaw |
|---|---|---|
1 << 0 | CREATE_INSTANT_INVITE | Create Invite |
1 << 1 | KICK_MEMBERS | Kick Members |
1 << 2 | BAN_MEMBERS | Ban Members |
1 << 3 | ADMINISTRATOR | Administrator |
1 << 4 | MANAGE_CHANNELS | Manage Channels |
1 << 5 | MANAGE_GUILD | Manage Guild |
1 << 6 | ADD_REACTIONS | Add Reactions |
1 << 7 | VIEW_AUDIT_LOG | View Audit Log |
1 << 9 | STREAM | Video (share your screen in voice channels) |
1 << 10 | VIEW_CHANNEL | View Channel |
1 << 11 | SEND_MESSAGES | Send Messages |
1 << 13 | MANAGE_MESSAGES | Manage Messages |
1 << 17 | MENTION_EVERYONE | Mention @everyone, @here and all roles |
1 << 20 | CONNECT | Connect |
1 << 21 | SPEAK | Speak |
1 << 28 | MANAGE_ROLES | Manage Roles |
1 << 29 | MANAGE_WEBHOOKS | Manage Webhooks |
1 << 30 | MANAGE_GUILD_EXPRESSIONS | Manage Emoji |
1 << 35 | CREATE_PUBLIC_THREADS | Create Threads |
1 << 33 | MANAGE_EVENTS | Manage Events: edit, start, end and cancel anyone's scheduled events |
1 << 38 | SEND_MESSAGES_IN_THREADS | Send Messages in Threads |
1 << 44 | CREATE_EVENTS | Create Events (and edit, start and cancel your own); @everyone has it by default |
1 << 51 | PIN_MESSAGES | Pin Messages |
1 << 56 | (Voicaw's own) | Edit Tasks, in list channels |
1 << 57 | (Voicaw's own) | Create Documents, in document channels |
1 << 58 | (Voicaw's own) | Queue Videos, in Watch Together |
1 << 59 | (Voicaw's own) | Manage Queue, in Watch Together |
1 << 60 | (Voicaw's own) | Control Playback, in Watch Together |
1 << 61 | (Voicaw's own) | Listen: hear the others in voice channels. A bot only has it when given it (never through @everyone); see Voice |
Bits that come with another
Voicaw has no separate permission for these, so Voicaw sends them set whenever the
permission they come with is. Libraries checking for them (discord.js's
permissionsIn(channel).has('EmbedLinks')) get the right answer.
| Bit | Comes with |
|---|---|
READ_MESSAGE_HISTORY (1 << 16) | View Channel |
EMBED_LINKS (1 << 14), ATTACH_FILES (1 << 15), USE_EXTERNAL_EMOJIS (1 << 18), USE_APPLICATION_COMMANDS (1 << 31) | Send Messages |
USE_VAD (1 << 25) | Speak |
CREATE_GUILD_EXPRESSIONS (1 << 43) | Manage Emoji |
When you send permissions (a role, an overwrite, an invite link), only the bits in the first table count. The ones that come with another, and Discord's bits Voicaw has no meaning for (Priority Speaker, Manage Nicknames, Moderate Members…), are ignored.
Some permissions can't be set per channel (overwritten): Kick, Ban, Administrator, Manage Channels, Manage Guild, Manage Roles, Manage Webhooks, View Audit Log, Manage Emoji, Create Invite and Mention Everyone. Those bits are dropped from an overwrite.