Class: Speaking

Speaking

Data structure that makes it easy to interact with a VoiceConnection#speaking and guildMemberSpeaking event bitfields.

Constructor

new Speaking()

Source:

Extends

Members

(static) FLAGS :Object

Numeric speaking flags. All available properties: * `SPEAKING` * `SOUNDSHARE` * `PRIORITY_SPEAKING`
Type:
  • Object
Source:
See:

bitfield :number

Bitfield of the packed bits
Type:
  • number
Inherited From:
Source:

Methods

add(…bitsopt) → {BitField}

Adds bits to these ones.
Parameters:
Name Type Attributes Description
bits BitFieldResolvable <optional>
<repeatable>
Bits to add
Inherited From:
Source:
Returns:
These bits or new BitField if the instance is frozen.
Type
BitField

any(bit) → {boolean}

Checks whether the bitfield has a bit, or any of multiple bits.
Parameters:
Name Type Description
bit BitFieldResolvable Bit(s) to check for
Inherited From:
Source:
Returns:
Type
boolean

equals(bit) → {boolean}

Checks if this bitfield equals another
Parameters:
Name Type Description
bit BitFieldResolvable Bit(s) to check for
Inherited From:
Source:
Returns:
Type
boolean

freeze() → {Readonly.<BitField>}

Freezes these bits, making them immutable.
Inherited From:
Source:
Returns:
These bits
Type
Readonly.<BitField>

has(bit) → {boolean}

Checks whether the bitfield has a bit, or multiple bits.
Parameters:
Name Type Description
bit BitFieldResolvable Bit(s) to check for
Inherited From:
Source:
Returns:
Type
boolean

missing(bits, …hasParams) → {Array.<string>}

Gets all given bits that are missing from the bitfield.
Parameters:
Name Type Attributes Description
bits BitFieldResolvable Bit(s) to check for
hasParams * <repeatable>
Additional parameters for the has method, if any
Inherited From:
Source:
Returns:
Type
Array.<string>

remove(…bitsopt) → {BitField}

Removes bits from these.
Parameters:
Name Type Attributes Description
bits BitFieldResolvable <optional>
<repeatable>
Bits to remove
Inherited From:
Source:
Returns:
These bits or new BitField if the instance is frozen.
Type
BitField

serialize(…hasParams) → {Object}

Gets an object mapping field names to a boolean indicating whether the bit is available.
Parameters:
Name Type Attributes Description
hasParams * <repeatable>
Additional parameters for the has method, if any
Inherited From:
Source:
Returns:
Type
Object

toArray(…hasParams) → {Array.<string>}

Gets an Array of bitfield names based on the bits available.
Parameters:
Name Type Attributes Description
hasParams * <repeatable>
Additional parameters for the has method, if any
Inherited From:
Source:
Returns:
Type
Array.<string>