Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Properties

default

default: { isMemberAdmin: (interaction: BaseCommandInteraction<CacheType>) => boolean; memberHasRole: (int: BaseCommandInteraction<CacheType>, role: string, exactCase?: boolean) => Promise<boolean> }

Type declaration

  • isMemberAdmin: (interaction: BaseCommandInteraction<CacheType>) => boolean
      • (interaction: BaseCommandInteraction<CacheType>): boolean
      • Checks if the member who triggered the interaction is an admin

        remark

        This checks if the member has the ADMINISTRATOR permission

        Parameters

        • interaction: BaseCommandInteraction<CacheType>

          The interaction to check

        Returns boolean

        Whether the member is an admin

  • memberHasRole: (int: BaseCommandInteraction<CacheType>, role: string, exactCase?: boolean) => Promise<boolean>
      • (int: BaseCommandInteraction<CacheType>, role: string, exactCase?: boolean): Promise<boolean>
      • Checks if a member of an interaction has a role, by id or name

        Parameters

        • int: BaseCommandInteraction<CacheType>

          The interaction to check

        • role: string

          The role name or id

        • exactCase: boolean = false

          Whether the role name should have the exact case/capitalization (default: false)

        Returns Promise<boolean>

        Whether the member has the role

Functions

Const isMemberAdmin

  • isMemberAdmin(interaction: BaseCommandInteraction<CacheType>): boolean
  • Checks if the member who triggered the interaction is an admin

    remark

    This checks if the member has the ADMINISTRATOR permission

    Parameters

    • interaction: BaseCommandInteraction<CacheType>

      The interaction to check

    Returns boolean

    Whether the member is an admin

Const memberHasRole

  • memberHasRole(int: BaseCommandInteraction<CacheType>, role: string, exactCase?: boolean): Promise<boolean>
  • Checks if a member of an interaction has a role, by id or name

    Parameters

    • int: BaseCommandInteraction<CacheType>

      The interaction to check

    • role: string

      The role name or id

    • exactCase: boolean = false

      Whether the role name should have the exact case/capitalization (default: false)

    Returns Promise<boolean>

    Whether the member has the role

Generated using TypeDoc