Class: Discordrb::VoiceState

Inherits:
Object
  • Object
show all
Defined in:
lib/discordrb/data.rb

Overview

A voice state represents the state of a member's connection to a voice channel. It includes data like the voice channel the member is connected to and mute/deaf flags.

Instance Attribute Summary collapse

Instance Attribute Details

#deaftrue, false (readonly)

Returns whether this voice state's member is deafened server-wide.

Returns:

  • (true, false)

    whether this voice state's member is deafened server-wide.


444
445
446
# File 'lib/discordrb/data.rb', line 444

def deaf
  @deaf
end

#mutetrue, false (readonly)

Returns whether this voice state's member is muted server-wide.

Returns:

  • (true, false)

    whether this voice state's member is muted server-wide.


441
442
443
# File 'lib/discordrb/data.rb', line 441

def mute
  @mute
end

#self_deaftrue, false (readonly)

Returns whether this voice state's member has deafened themselves.

Returns:

  • (true, false)

    whether this voice state's member has deafened themselves.


450
451
452
# File 'lib/discordrb/data.rb', line 450

def self_deaf
  @self_deaf
end

#self_mutetrue, false (readonly)

Returns whether this voice state's member has muted themselves.

Returns:

  • (true, false)

    whether this voice state's member has muted themselves.


447
448
449
# File 'lib/discordrb/data.rb', line 447

def self_mute
  @self_mute
end

#user_idInteger (readonly)

Returns the ID of the user whose voice state is represented by this object.

Returns:

  • (Integer)

    the ID of the user whose voice state is represented by this object.


438
439
440
# File 'lib/discordrb/data.rb', line 438

def user_id
  @user_id
end

#voice_channelChannel (readonly)

Returns the voice channel this voice state's member is in.

Returns:

  • (Channel)

    the voice channel this voice state's member is in.


453
454
455
# File 'lib/discordrb/data.rb', line 453

def voice_channel
  @voice_channel
end