--- id: permissions title: Permissions custom_edit_url: https://github.com/cordejs/corde/blob/master/docs/Permissions.mdx --- Permissions are used by roles to manage user's access and actions inside a guild. ```typescript import { Permission, RolePermission } from "corde"; ``` ```typescript type RolePermission = | "CREATE_INSTANT_INVITE" | "KICK_MEMBERS" | "BAN_MEMBERS" | "ADMINISTRATOR" | "MANAGE_CHANNELS" | "MANAGE_GUILD" | "ADD_REACTIONS" | "VIEW_AUDIT_LOG" | "PRIORITY_SPEAKER" | "STREAM" | "VIEW_CHANNEL" | "SEND_MESSAGES" | "SEND_TTS_MESSAGES" | "MANAGE_MESSAGES" | "EMBED_LINKS" | "ATTACH_FILES" | "READ_MESSAGE_HISTORY" | "MENTION_EVERYONE" | "USE_EXTERNAL_EMOJIS" | "VIEW_GUILD_INSIGHTS" | "CONNECT" | "SPEAK" | "MUTE_MEMBERS" | "DEAFEN_MEMBERS" | "MOVE_MEMBERS" | "USE_VAD" | "CHANGE_NICKNAME" | "MANAGE_NICKNAMES" | "MANAGE_ROLES" | "MANAGE_WEBHOOKS" | "MANAGE_EMOJIS"; enum Permission { CREATE_INSTANT_INVITE = 0x00000001, KICK_MEMBERS = 0x00000002, BAN_MEMBERS = 0x00000004, ADMINISTRATOR = 0x00000008, MANAGE_CHANNELS = 0x00000010, MANAGE_GUILD = 0x00000020, ADD_REACTIONS = 0x00000040, VIEW_AUDIT_LOG = 0x00000080, VIEW_CHANNEL = 0x00000400, SEND_MESSAGES = 0x00000800, SEND_TTS_MESSAGES = 0x00001000, MANAGE_MESSAGES = 0x00002000, EMBED_LINKS = 0x00004000, ATTACH_FILES = 0x00008000, READ_MESSAGE_HISTORY = 0x00010000, MENTION_EVERYONE = 0x00020000, USE_EXTERNAL_EMOJIS = 0x00040000, CONNECT = 0x00100000, SPEAK = 0x00200000, MUTE_MEMBERS = 0x00400000, DEAFEN_MEMBERS = 0x00800000, MOVE_MEMBERS = 0x01000000, USE_VAD = 0x02000000, PRIORITY_SPEAKER = 0x00000100, CHANGE_NICKNAME = 0x04000000, MANAGE_NICKNAMES = 0x08000000, MANAGE_ROLES = 0x10000000, MANAGE_WEBHOOKS = 0x20000000, MANAGE_EMOJIS = 0x40000000, STREAM = 0x00000200, VIEW_GUILD_INSIGHTS = 0x00080000, } ``` ### CREATE_INSTANT_INVITE **Code: `0x00000001`** Allows creation of instant invites Used in **Text** and **Voice** Channel ### KICK_MEMBERS **Code: `0x00000002`** Allows kicking members. Indifferent of channel ### BAN_MEMBERS **Code: ``0x00000004`** Allows banning members. Indifferent of the channel. ### ADMINISTRATOR **Code: `0x00000008`** Allows all permissions and bypasses channel permission overwrites. Indifferent of channel ### MANAGE_CHANNELS **Code: `0x00000010`** Allows management and editing of channels. Used in **Text** and **Voice** Channel ### MANAGE_GUILD **Code: `0x00000020`** Allows management and editing of the guild. Used in **Text** and **Voice** Channel. ### ADD_REACTIONS **Code: `0x00000040`** Allows for the addition of reactions to messages. Used in **Text** Channel only. ### VIEW_AUDIT_LOG **Code: `0x00000080`** Allows for viewing of audit logs. Used in **Text** and **Voice** Channel. ### VIEW_CHANNEL **Code: `0x00000400`** allows guild members to view a channel, which includes reading messages in text channels. Indifferent of the channel. ### SEND_MESSAGES **Code: `0x00000800`** Allows for sending messages in a channel. Used in **Text** Channel only. ### SEND_TTS_MESSAGES **Code: `0x00001000`** Allows for sending of /tts messages. Used in **Text** Channel only. ### MANAGE_MESSAGES **Code: `0x00002000`** Allows for deletion of other user's messages. Used in **Text** Channel only. ### EMBED_LINKS **Code: `0x00004000`** Links sent by users with this permission will be auto-embedded. Used in **Text** Channel only. ### ATTACH_FILES **Code: `0x00008000`** Allows for uploading images and files. Used in **Text** Channel only. ### READ_MESSAGE_HISTORY **Code: `0x00010000`** Allows for reading of message history. Used in **Text** Channel only. ### MENTION_EVERYONE **Code: `0x00020000`** Allows for using the @everyone tag to notify all users in a channel, and the @here tag to notify all online users in a channel Used in **Text** Channel only. ### USE_EXTERNAL_EMOJIS **Code: `0x00040000`** Allows the usage of custom emojis from other servers. Used in **Text** Channel only. ### CONNECT **Code: `0x00100000`** Allows for joining of a voice channel. Used in **Voice** Channel only. ### SPEAK **Code: `0x00200000`** Allows for speaking in a voice channel. Used in **Voice** Channel only. ### MUTE_MEMBERS **Code: `0x00400000`** Allows for muting members in a voice channel. Used in **Voice** Channel only. ### DEAFEN_MEMBERS **Code: `0x00800000`** Allows for deafening of members in a voice channel. Used in **Voice** Channel only. ### MOVE_MEMBERS **Code: `0x01000000`** Allows for moving of members between voice channels. Used in **Voice** Channel only. ### USE_VAD **Code: `0x02000000`** Allows for using voice-activity-detection in a voice channel. Used in **Voice** Channel only. ### PRIORITY_SPEAKER **Code: `0x00000100`** Allows for using priority speaker in a voice channel. Used in **Voice** Channel only. ### CHANGE_NICKNAME **Code: `0x04000000`** Allows for modification of own nickname. Indifferent of the channel. ### MANAGE_NICKNAMES **Code: `0x08000000`** Allows for modification of other user's nicknames. Indifferent of the channel. ### MANAGE_ROLES **Code: `0x10000000`** Allows management and editing of roles. Used in **Text** and **Voice** Channel. ### MANAGE_WEBHOOKS **Code: `0x20000000`** Allows management and editing of webhooks. Used in **Text** and **Voice** Channel. ### MANAGE_EMOJIS **Code: `0x40000000`** Allows management and editing of emojis. Indifferent of the channel. ### STREAM **Code: `0x00000200`** Allows the user to go live. Used in **Voice** Channel only. ### VIEW_GUILD_INSIGHTS **Code: `0x00080000`** Allows for viewing guild insights. Indifferent of the channel.