diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-02-14 00:45:23 +0100 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-02-14 00:45:23 +0100 |
commit | 7363f243ad9936466b97266592037ee0a5290c54 (patch) | |
tree | 39fd089fd6d5fbbcb0832fcfb0f4527a098094e0 /src/util | |
parent | :bug: fix Permissions type declaration (diff) | |
download | server-7363f243ad9936466b97266592037ee0a5290c54.tar.xz |
:bug: fix PermissionResolvable
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/Permissions.ts | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/util/Permissions.ts b/src/util/Permissions.ts index e7c1b43b..c7a3d81f 100644 --- a/src/util/Permissions.ts +++ b/src/util/Permissions.ts @@ -6,7 +6,40 @@ import { ChannelPermissionOverwrite } from "../models/Channel"; import { Role, RoleModel } from "../models/Role"; import { BitField } from "./BitField"; -export type PermissionResolvable = bigint | number | Permissions | PermissionResolvable[]; +export type PermissionResolvable = bigint | number | Permissions | PermissionResolvable[] | PermissionString; + +type PermissionString = + | "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"; export class Permissions extends BitField { static FLAGS = { |