Intents
classe · Source
Data structure that makes it easy to calculate intents.
Extends: BitField
Constructor
Parameters
| Name | Type | Description |
|---|---|---|
bits? | IntentsResolvable | Bit(s) to read from Default: 0. |
Properties
bitfield
Bitfield of the packed bits Source
FLAGS
Numeric WebSocket intents. All available properties:
GUILDSGUILD_MEMBERSGUILD_BANSGUILD_EMOJIS_AND_STICKERSGUILD_INTEGRATIONSGUILD_WEBHOOKSGUILD_INVITESGUILD_VOICE_STATESGUILD_PRESENCESGUILD_MESSAGESGUILD_MESSAGE_REACTIONSGUILD_MESSAGE_TYPINGDIRECT_MESSAGESDIRECT_MESSAGE_REACTIONSDIRECT_MESSAGE_TYPINGMESSAGE_CONTENTGUILD_SCHEDULED_EVENTSAUTO_MODERATION_CONFIGURATIONAUTO_MODERATION_EXECUTIONSource
Methods
any
Checks whether the bitfield has a bit, or any of multiple bits. Parameters
| Name | Type | Description |
|---|---|---|
bit | BitFieldResolvable | Bit(s) to check for |
Returns: booleanSource
equals
Checks if this bitfield equals another Parameters
| Name | Type | Description |
|---|---|---|
bit | BitFieldResolvable | Bit(s) to check for |
Returns: booleanSource
has
Checks whether the bitfield has a bit, or multiple bits. Parameters
| Name | Type | Description |
|---|---|---|
bit | BitFieldResolvable | Bit(s) to check for |
Returns: booleanSource
missing
Gets all given bits that are missing from the bitfield. Parameters
| Name | Type | Description |
|---|---|---|
bits | BitFieldResolvable | Bit(s) to check for |
hasParams | * | Additional parameters for the has method, if any |
Returns: Array<string>Source
freeze
Freezes these bits, making them immutable. Returns: Readonly<BitField>Source
add
Adds bits to these ones. Parameters
| Name | Type | Description |
|---|---|---|
bits? | BitFieldResolvable | Bits to add |
Returns: BitField — These bits or new BitField if the instance is frozen. Source
remove
Removes bits from these. Parameters
| Name | Type | Description |
|---|---|---|
bits? | BitFieldResolvable | Bits to remove |
Returns: BitField — These bits or new BitField if the instance is frozen. Source
serialize
Gets an object mapping field names to a boolean indicating whether the bit is available. Parameters
| Name | Type | Description |
|---|---|---|
hasParams | * | Additional parameters for the has method, if any |
Returns: ObjectSource
toArray
Gets an Array of bitfield names based on the bits available. Parameters
| Name | Type | Description |
|---|---|---|
hasParams | * | Additional parameters for the has method, if any |
Returns: Array<string>Source