mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 17:43:08 -04:00
feat(plugins): Permissions Viewer (#477)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
9c1b3a9afd
commit
64b38348d4
11 changed files with 938 additions and 5 deletions
45
src/webpack/common/types/utils.d.ts
vendored
45
src/webpack/common/types/utils.d.ts
vendored
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue