Skip to content

ApplicationFlags

classe · Source

Data structure that makes it easy to interact with a Application#flags bitfield.

Extends: BitField

Constructor

new ApplicationFlags(bits?: BitFieldResolvable)

Parameters

NameTypeDescription
bits?BitFieldResolvableBit(s) to read from Default: 0.

Properties

bitfield

bitfield: number

Bitfield of the packed bits Source

FLAGS

static

FLAGS: Object

Numeric application flags. All available properties:

  • EMBEDDED_RELEASED
  • MANAGED_EMOJI
  • GROUP_DM_CREATE
  • RPC_PRIVATE_BETA
  • APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE
  • ALLOW_ASSETS
  • ALLOW_ACTIVITY_ACTION_SPECTATE
  • ALLOW_ACTIVITY_ACTION_JOIN_REQUEST
  • RPC_HAS_CONNECTED
  • GATEWAY_PRESENCE
  • GATEWAY_PRESENCE_LIMITED
  • GATEWAY_GUILD_MEMBERS
  • GATEWAY_GUILD_MEMBERS_LIMITED
  • VERIFICATION_PENDING_GUILD_LIMIT
  • EMBEDDED
  • GATEWAY_MESSAGE_CONTENT
  • GATEWAY_MESSAGE_CONTENT_LIMITED
  • EMBEDDED_FIRST_PARTY
  • APPLICATION_COMMAND_BADGE
  • ACTIVE
  • IFRAME_MODALSource

Methods

any

any(bit: BitFieldResolvable): boolean

Checks whether the bitfield has a bit, or any of multiple bits. Parameters

NameTypeDescription
bitBitFieldResolvableBit(s) to check for

Returns: booleanSource

equals

equals(bit: BitFieldResolvable): boolean

Checks if this bitfield equals another Parameters

NameTypeDescription
bitBitFieldResolvableBit(s) to check for

Returns: booleanSource

has

has(bit: BitFieldResolvable): boolean

Checks whether the bitfield has a bit, or multiple bits. Parameters

NameTypeDescription
bitBitFieldResolvableBit(s) to check for

Returns: booleanSource

missing

missing(bits: BitFieldResolvable, hasParams: *): Array<string>

Gets all given bits that are missing from the bitfield. Parameters

NameTypeDescription
bitsBitFieldResolvableBit(s) to check for
hasParams*Additional parameters for the has method, if any

Returns: Array<string>Source

freeze

freeze(): Readonly<BitField>

Freezes these bits, making them immutable. Returns: Readonly<BitField>Source

add

add(bits?: BitFieldResolvable): BitField

Adds bits to these ones. Parameters

NameTypeDescription
bits?BitFieldResolvableBits to add

Returns: BitField — These bits or new BitField if the instance is frozen. Source

remove

remove(bits?: BitFieldResolvable): BitField

Removes bits from these. Parameters

NameTypeDescription
bits?BitFieldResolvableBits to remove

Returns: BitField — These bits or new BitField if the instance is frozen. Source

serialize

serialize(hasParams: *): Object

Gets an object mapping field names to a boolean indicating whether the bit is available. Parameters

NameTypeDescription
hasParams*Additional parameters for the has method, if any

Returns: ObjectSource

toArray

toArray(hasParams: *): Array<string>

Gets an Array of bitfield names based on the bits available. Parameters

NameTypeDescription
hasParams*Additional parameters for the has method, if any

Returns: Array<string>Source

Unofficial software. Not affiliated with or supported by Discord.