Skip to content

Commit

Permalink
chore(permissions): updated permission flags and names (#617)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbrettnich committed Jun 18, 2024
1 parent 5ccc8d1 commit d0e5013
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
22 changes: 16 additions & 6 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1040,8 +1040,8 @@ export const PermissionNames: { [perm: string]: string } = {
ADD_REACTIONS: 'Add reactions',
VIEW_AUDIT_LOG: 'View audit log',
PRIORITY_SPEAKER: 'Priority speaker',
STREAM: 'Stream',
VIEW_CHANNEL: 'Read text channels and see voice channels',
STREAM: 'Video',
VIEW_CHANNEL: 'Read messages and view channels',
SEND_MESSAGES: 'Send messages',
SEND_TTS_MESSAGES: 'Send TTS messages',
MANAGE_MESSAGES: 'Manage messages',
Expand All @@ -1061,16 +1061,26 @@ export const PermissionNames: { [perm: string]: string } = {
MANAGE_NICKNAMES: 'Manage nicknames',
MANAGE_ROLES: 'Manage roles',
MANAGE_WEBHOOKS: 'Manage webhooks',
MANAGE_EMOJIS_AND_STICKERS: 'Manage emojis and stickers',
MANAGE_EMOJIS_AND_STICKERS: 'Manage expressions',
MANAGE_GUILD_EXPRESSIONS: 'Manage expressions',
USE_APPLICATION_COMMANDS: 'Use application commands',
REQUEST_TO_SPEAK: 'Request to speak',
MANAGE_EVENTS: 'Manage events',
MANAGE_THREADS: 'Manage threads',
USE_PUBLIC_THREADS: 'Use public threads',
USE_PRIVATE_THREADS: 'Use private threads',
USE_PUBLIC_THREADS: 'Create public threads',
CREATE_PUBLIC_THREADS: 'Create public threads',
USE_PRIVATE_THREADS: 'Create private threads',
CREATE_PRIVATE_THREADS: 'Create private threads',
USE_EXTERNAL_STICKERS: 'Use external stickers',
SEND_MESSAGES_IN_THREADS: 'Send messages in threads',
USE_EMBEDDED_ACTIVITIES: 'Use embedded activities',
MODERATE_MEMBERS: 'Moderate members'
MODERATE_MEMBERS: 'Moderate members',
VIEW_CREATOR_MONETIZATION_ANALYTICS: 'View creator monetization insights',
USE_SOUNDBOARD: 'Use soundboard',
USE_EXTERNAL_SOUNDS: 'Use external sounds',
SEND_VOICE_MESSAGES: 'Send voice messages',
SEND_POLLS: 'Create polls',
USE_EXTERNAL_APPS: 'Use external apps'
};

export const Endpoints = {
Expand Down
10 changes: 9 additions & 1 deletion src/structures/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,29 @@ const FLAGS: { [perm: string]: bigint } = {
MANAGE_NICKNAMES: 1n << 27n,
MANAGE_ROLES: 1n << 28n,
MANAGE_WEBHOOKS: 1n << 29n,
/** @deprecated Use MANAGE_GUILD_EXPRESSIONS instead. */
MANAGE_EMOJIS_AND_STICKERS: 1n << 30n,
MANAGE_GUILD_EXPRESSIONS: 1n << 30n,
USE_APPLICATION_COMMANDS: 1n << 31n,
REQUEST_TO_SPEAK: 1n << 32n,
MANAGE_EVENTS: 1n << 33n,
MANAGE_THREADS: 1n << 34n,
/** @deprecated Use CREATE_PUBLIC_THREADS instead. */
USE_PUBLIC_THREADS: 1n << 35n,
CREATE_PUBLIC_THREADS: 1n << 35n,
/** @deprecated Use CREATE_PRIVATE_THREADS instead. */
USE_PRIVATE_THREADS: 1n << 36n,
CREATE_PRIVATE_THREADS: 1n << 36n,
USE_EXTERNAL_STICKERS: 1n << 37n,
SEND_MESSAGES_IN_THREADS: 1n << 38n,
USE_EMBEDDED_ACTIVITIES: 1n << 39n,
MODERATE_MEMBERS: 1n << 40n,
VIEW_CREATOR_MONETIZATION_ANALYTICS: 1n << 41n,
USE_SOUNDBOARD: 1n << 42n,
USE_EXTERNAL_SOUNDS: 1n << 45n,
SEND_VOICE_MESSAGES: 1n << 46n
SEND_VOICE_MESSAGES: 1n << 46n,
SEND_POLLS: 1n << 49n,
USE_EXTERNAL_APPS: 1n << 50n
};

/**
Expand Down

0 comments on commit d0e5013

Please sign in to comment.