class Discordrb::VoiceState
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.
Attributes
@return [true, false] whether this voice state’s member is deafened server-wide.
@return [true, false] whether this voice state’s member is muted server-wide.
@return [true, false] whether this voice state’s member has deafened themselves.
@return [true, false] whether this voice state’s member has muted themselves.
@return [Integer] the ID of the user whose voice state is represented by this object.
@return [Channel] the voice channel this voice state’s member is in.
Public Class Methods
@!visibility private
# File lib/discordrb/data/voice_state.rb, line 26 def initialize(user_id) @user_id = user_id end
Public Instance Methods
Update this voice state with new data from Discord @note For internal use only. @!visibility private
# File lib/discordrb/data/voice_state.rb, line 33 def update(channel, mute, deaf, self_mute, self_deaf) @voice_channel = channel @mute = mute @deaf = deaf @self_mute = self_mute @self_deaf = self_deaf end