diff options
Diffstat (limited to 'src/webpack')
-rw-r--r-- | src/webpack/common/types/utils.d.ts | 45 | ||||
-rw-r--r-- | src/webpack/common/utils.ts | 2 |
2 files changed, 47 insertions, 0 deletions
diff --git a/src/webpack/common/types/utils.d.ts b/src/webpack/common/types/utils.d.ts index 1534f32..51b3cee 100644 --- a/src/webpack/common/types/utils.d.ts +++ b/src/webpack/common/types/utils.d.ts @@ -85,6 +85,51 @@ export type RestAPI = Record<"delete" | "get" | "patch" | "post" | "put", (data: getAPIBaseURL(withVersion?: boolean): string; }; +export type Permissions = "CREATE_INSTANT_INVITE" + | "KICK_MEMBERS" + | "BAN_MEMBERS" + | "ADMINISTRATOR" + | "MANAGE_CHANNELS" + | "MANAGE_GUILD" + | "CHANGE_NICKNAME" + | "MANAGE_NICKNAMES" + | "MANAGE_ROLES" + | "MANAGE_WEBHOOKS" + | "MANAGE_GUILD_EXPRESSIONS" + | "VIEW_AUDIT_LOG" + | "VIEW_CHANNEL" + | "VIEW_GUILD_ANALYTICS" + | "VIEW_CREATOR_MONETIZATION_ANALYTICS" + | "MODERATE_MEMBERS" + | "SEND_MESSAGES" + | "SEND_TTS_MESSAGES" + | "MANAGE_MESSAGES" + | "EMBED_LINKS" + | "ATTACH_FILES" + | "READ_MESSAGE_HISTORY" + | "MENTION_EVERYONE" + | "USE_EXTERNAL_EMOJIS" + | "ADD_REACTIONS" + | "USE_APPLICATION_COMMANDS" + | "MANAGE_THREADS" + | "CREATE_PUBLIC_THREADS" + | "CREATE_PRIVATE_THREADS" + | "USE_EXTERNAL_STICKERS" + | "SEND_MESSAGES_IN_THREADS" + | "CONNECT" + | "SPEAK" + | "MUTE_MEMBERS" + | "DEAFEN_MEMBERS" + | "MOVE_MEMBERS" + | "USE_VAD" + | "PRIORITY_SPEAKER" + | "STREAM" + | "USE_EMBEDDED_ACTIVITIES" + | "REQUEST_TO_SPEAK" + | "MANAGE_EVENTS"; + +export type PermissionsBits = Record<Permissions, bigint>; + export interface Locale { name: string; value: string; diff --git a/src/webpack/common/utils.ts b/src/webpack/common/utils.ts index 3893a3a..629d052 100644 --- a/src/webpack/common/utils.ts +++ b/src/webpack/common/utils.ts @@ -114,3 +114,5 @@ waitFor("parseTopic", m => Parser = m); export let SettingsRouter: any; waitFor(["open", "saveAccountChanges"], m => SettingsRouter = m); + +export const PermissionsBits: t.PermissionsBits = findLazy(m => typeof m.ADMINISTRATOR === "bigint"); |