Class: RubyCord::Guild::VoiceChannel::VoiceState

Inherits:
DiscordModel
  • Object
show all
Defined in:
lib/rubycord/guild/channel/voice/voice_state.rb

Instance Attribute Summary collapse

Method Summary

Methods inherited from DiscordModel

#==, #eql?, #inspect

Instance Attribute Details

#channelnil, RubyCord::Channel (readonly)

Note:

This method returns an object from client cache. it will return nil if the object is not in cache.

Returns:

  • (nil)

    The object wasn't cached.

  • (RubyCord::Channel)

    The channel this voice state is for.



# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 33


#deaf?Boolean (readonly)

Returns Whether the user is deafened.

Returns:

  • (Boolean)

    Whether the user is deafened.



# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 33


#guildnil, RubyCord::Guild (readonly)

Note:

This method returns an object from client cache. it will return nil if the object is not in cache.

Returns:

  • (nil)

    The object wasn't cached.

  • (RubyCord::Guild)

    The guild this voice state is for.



# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 33


#memberRubyCord::Guild::Member (readonly)

Returns The member associated with this voice state.

Returns:



11
12
13
# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 11

def member
  @member
end

#mute?Boolean (readonly)

Returns Whether the user is muted.

Returns:

  • (Boolean)

    Whether the user is muted.



# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 33


#request_to_speak_timestampTime (readonly)

Returns The time at which the user requested to speak.

Returns:

  • (Time)

    The time at which the user requested to speak.



15
16
17
# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 15

def request_to_speak_timestamp
  @request_to_speak_timestamp
end

#self_deafBoolean (readonly) Also known as: self_deaf?

Returns Whether the user is deafened.

Returns:

  • (Boolean)

    Whether the user is deafened.



17
18
19
# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 17

def self_deaf
  @self_deaf
end

#self_muteBoolean (readonly) Also known as: self_mute?

Returns Whether the user is muted.

Returns:

  • (Boolean)

    Whether the user is muted.



20
21
22
# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 20

def self_mute
  @self_mute
end

#self_streamBoolean (readonly) Also known as: stream?

Returns Whether the user is streaming.

Returns:

  • (Boolean)

    Whether the user is streaming.



23
24
25
# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 23

def self_stream
  @self_stream
end

#self_videoBoolean (readonly) Also known as: video?

Returns Whether the user is video-enabled.

Returns:

  • (Boolean)

    Whether the user is video-enabled.



27
28
29
# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 27

def self_video
  @self_video
end

#server_deaf?Boolean (readonly)

Returns Whether the user is deafened on the server.

Returns:

  • (Boolean)

    Whether the user is deafened on the server.



# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 33


#server_mute?Boolean (readonly)

Returns Whether the user is muted on the server.

Returns:

  • (Boolean)

    Whether the user is muted on the server.



# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 33


#session_idRubyCord::Snowflake (readonly)

Returns The ID of the guild this voice state is for.

Returns:



13
14
15
# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 13

def session_id
  @session_id
end

#suppressBoolean (readonly) Also known as: suppress?

Returns Whether the user is suppressed. (Is at audience).

Returns:

  • (Boolean)

    Whether the user is suppressed. (Is at audience)



30
31
32
# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 30

def suppress
  @suppress
end

#usernil, RubyCord::User (readonly)

Note:

This method returns an object from client cache. it will return nil if the object is not in cache.

Returns:

  • (nil)

    The object wasn't cached.

  • (RubyCord::User)

    The user this voice state is for.



# File 'lib/rubycord/guild/channel/voice/voice_state.rb', line 33