Class PermissionsUtils

Utilities for permission flags.

Hierarchy

  • PermissionsUtils

Constructors

Accessors

Methods

  • Apply overwrites to permission flags.

    Parameters

    • perms: number | bigint

      The permissions to apply overwrites to.

    • overwrites: APIOverwrite | APIOverwrite[]

      Overwrites to apply.

    • id: string

      Only apply overwrites with this ID.

    Returns bigint

  • Combine permission flags.

    Parameters

    • Rest ...flags: PermissionsFlags[]

      The flags to combine.

    Returns bigint

  • Check if a combination of permission flags includes a permission.

    Parameters

    • perms: number | bigint

      Permission flags to test for permissions.

    • Rest ...test: PermissionsFlags[]

      The permissions to test for.

    Returns boolean

  • Returns missing permissions.

    Parameters

    • perms: number | bigint

      Permission flags to test for permissions.

    • Rest ...test: PermissionsFlags[]

      The permissions to test for.

    Returns bigint

  • Remove permission flags.

    Parameters

    • baseFlags: number | bigint

      The base flags to subtract from.

    • Rest ...flags: PermissionsFlags[]

      The flags to subtract.

    Returns bigint

  • Applies timeout overwrites to permission flags.

    Parameters

    • perms: number | bigint

      The permissions to convert.

    Returns bigint

  • Converts permission flags to readable strings.

    Parameters

    • perms: number | bigint

      The permissions to convert.

    Returns ("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_AND_STICKERS" | "USE_APPLICATION_COMMANDS" | "REQUEST_TO_SPEAK" | "MANAGE_EVENTS" | "MANAGE_THREADS" | "CREATE_PUBLIC_THREADS" | "CREATE_PRIVATE_THREADS" | "USE_EXTERNAL_STICKERS" | "SEND_MESSAGES_IN_THREADS" | "USE_EMBEDDED_ACTIVITIES" | "MODERATE_MEMBERS")[]

Generated using TypeDoc