Skip to main content

VoiceStateToggles

@discordeno/bot


Documentation / @discordeno/bot / VoiceStateToggles

Class: VoiceStateToggles

Defined in: packages/bot/src/transformers/toggles/voice.ts:21

Extends

Constructors

new VoiceStateToggles()

new VoiceStateToggles(voiceOrTogglesInt): VoiceStateToggles

Defined in: packages/bot/src/transformers/toggles/voice.ts:22

Parameters

voiceOrTogglesInt

number | DiscordVoiceState

Returns

VoiceStateToggles

Overrides

ToggleBitfield.constructor

Properties

bitfield

bitfield: number = 0

Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:2

Inherited from

ToggleBitfield.bitfield

Accessors

deaf

Get Signature

get deaf(): boolean

Defined in: packages/bot/src/transformers/toggles/voice.ts:40

Whether this user is deafened by the server

Returns

boolean


mute

Get Signature

get mute(): boolean

Defined in: packages/bot/src/transformers/toggles/voice.ts:45

Whether this user is muted by the server

Returns

boolean


selfDeaf

Get Signature

get selfDeaf(): boolean

Defined in: packages/bot/src/transformers/toggles/voice.ts:50

Whether this user is locally deafened

Returns

boolean


selfMute

Get Signature

get selfMute(): boolean

Defined in: packages/bot/src/transformers/toggles/voice.ts:55

Whether this user is locally muted

Returns

boolean


selfStream

Get Signature

get selfStream(): boolean

Defined in: packages/bot/src/transformers/toggles/voice.ts:60

Whether this user is streaming using "Go Live"

Returns

boolean


selfVideo

Get Signature

get selfVideo(): boolean

Defined in: packages/bot/src/transformers/toggles/voice.ts:65

Whether this user's camera is enabled

Returns

boolean


suppress

Get Signature

get suppress(): boolean

Defined in: packages/bot/src/transformers/toggles/voice.ts:70

Whether this user is muted by the current user

Returns

boolean

Methods

add()

add(bits): this

Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:14

Adds some bits to the bitfield.

Parameters

bits

number

Returns

this

Inherited from

ToggleBitfield.add


contains()

contains(bits): boolean

Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:9

Tests whether or not this bitfield has the permission requested.

Parameters

bits

number

Returns

boolean

Inherited from

ToggleBitfield.contains


has()

has(permissions): boolean

Defined in: packages/bot/src/transformers/toggles/voice.ts:75

Checks whether or not the permissions exist in this

Parameters

permissions

"deaf" | "mute" | "suppress" | "selfDeaf" | "selfMute" | "selfStream" | "selfVideo" | ("deaf" | "mute" | "suppress" | "selfDeaf" | "selfMute" | "selfStream" | "selfVideo")[]

Returns

boolean


list()

list(): Record<"deaf" | "mute" | "suppress" | "selfDeaf" | "selfMute" | "selfStream" | "selfVideo", boolean>

Defined in: packages/bot/src/transformers/toggles/voice.ts:82

Lists all the toggles for the role and whether or not each is true or false.

Returns

Record<"deaf" | "mute" | "suppress" | "selfDeaf" | "selfMute" | "selfStream" | "selfVideo", boolean>


remove()

remove(bits): this

Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:20

Removes some bits from the bitfield.

Parameters

bits

number

Returns

this

Inherited from

ToggleBitfield.remove


toJSON()

toJSON(): number

Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:25

Returns

number

Inherited from

ToggleBitfield.toJSON