Skip to main content

VoiceStateToggles

@discordeno/botDocs


Documentation / @discordeno/bot / VoiceStateToggles

Class: VoiceStateToggles

Extends

Constructors

new VoiceStateToggles()

new VoiceStateToggles(voiceOrTogglesInt): VoiceStateToggles

Parameters

voiceOrTogglesInt: number | DiscordVoiceState

Returns

VoiceStateToggles

Overrides

ToggleBitfield.constructor

Defined in

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

Properties

bitfield

bitfield: number = 0

Inherited from

ToggleBitfield.bitfield

Defined in

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

Accessors

deaf

Get Signature

get deaf(): boolean

Whether this user is deafened by the server

Returns

boolean

Defined in

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


mute

Get Signature

get mute(): boolean

Whether this user is muted by the server

Returns

boolean

Defined in

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


selfDeaf

Get Signature

get selfDeaf(): boolean

Whether this user is locally deafened

Returns

boolean

Defined in

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


selfMute

Get Signature

get selfMute(): boolean

Whether this user is locally muted

Returns

boolean

Defined in

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


selfStream

Get Signature

get selfStream(): boolean

Whether this user is streaming using "Go Live"

Returns

boolean

Defined in

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


selfVideo

Get Signature

get selfVideo(): boolean

Whether this user's camera is enabled

Returns

boolean

Defined in

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


suppress

Get Signature

get suppress(): boolean

Whether this user is muted by the current user

Returns

boolean

Defined in

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

Methods

add()

add(bits): this

Adds some bits to the bitfield.

Parameters

bits: number

Returns

this

Inherited from

ToggleBitfield.add

Defined in

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


contains()

contains(bits): boolean

Tests whether or not this bitfield has the permission requested.

Parameters

bits: number

Returns

boolean

Inherited from

ToggleBitfield.contains

Defined in

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


has()

has(permissions): boolean

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

Defined in

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


list()

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

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>

Defined in

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


remove()

remove(bits): this

Removes some bits from the bitfield.

Parameters

bits: number

Returns

this

Inherited from

ToggleBitfield.remove

Defined in

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


toJSON()

toJSON(): number

Returns

number

Inherited from

ToggleBitfield.toJSON

Defined in

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