Class: Discorb::VoiceState
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- Discorb::VoiceState
- Defined in:
- lib/discorb/voice_state.rb
Overview
Represents a state of user in voice channel.
Instance Attribute Summary collapse
- #channel ⇒ nil, Discorb::Channel readonly
-
#deaf? ⇒ Boolean
readonly
Whether the user is deafened.
- #guild ⇒ nil, Discorb::Guild readonly
-
#member ⇒ Discorb::Member
readonly
The member associated with this voice state.
-
#mute? ⇒ Boolean
readonly
Whether the user is muted.
-
#request_to_speak_timestamp ⇒ Time
readonly
The time at which the user requested to speak.
-
#self_deaf ⇒ Boolean
(also: #self_deaf?)
readonly
Whether the user is deafened.
-
#self_mute ⇒ Boolean
(also: #self_mute?)
readonly
Whether the user is muted.
-
#self_stream ⇒ Boolean
(also: #stream?)
readonly
Whether the user is streaming.
-
#self_video ⇒ Boolean
(also: #video?)
readonly
Whether the user is video-enabled.
-
#server_deaf? ⇒ Boolean
readonly
Whether the user is deafened on the server.
-
#server_mute? ⇒ Boolean
readonly
Whether the user is muted on the server.
-
#session_id ⇒ Discorb::Snowflake
readonly
The ID of the guild this voice state is for.
-
#suppress ⇒ Boolean
(also: #suppress?)
readonly
Whether the user is suppressed.
- #user ⇒ nil, Discorb::User readonly
Method Summary
Methods inherited from DiscordModel
Instance Attribute Details
#channel ⇒ nil, Discorb::Channel (readonly)
This method returns an object from client cache. it will return nil
if the object is not in cache.
|
# File 'lib/discorb/voice_state.rb', line 31
|
#deaf? ⇒ Boolean (readonly)
Returns Whether the user is deafened.
|
# File 'lib/discorb/voice_state.rb', line 31
|
#guild ⇒ nil, Discorb::Guild (readonly)
This method returns an object from client cache. it will return nil
if the object is not in cache.
|
# File 'lib/discorb/voice_state.rb', line 31
|
#member ⇒ Discorb::Member (readonly)
Returns The member associated with this voice state.
9 10 11 |
# File 'lib/discorb/voice_state.rb', line 9 def member @member end |
#mute? ⇒ Boolean (readonly)
Returns Whether the user is muted.
|
# File 'lib/discorb/voice_state.rb', line 31
|
#request_to_speak_timestamp ⇒ Time (readonly)
Returns The time at which the user requested to speak.
13 14 15 |
# File 'lib/discorb/voice_state.rb', line 13 def @request_to_speak_timestamp end |
#self_deaf ⇒ Boolean (readonly) Also known as: self_deaf?
Returns Whether the user is deafened.
15 16 17 |
# File 'lib/discorb/voice_state.rb', line 15 def self_deaf @self_deaf end |
#self_mute ⇒ Boolean (readonly) Also known as: self_mute?
Returns Whether the user is muted.
18 19 20 |
# File 'lib/discorb/voice_state.rb', line 18 def self_mute @self_mute end |
#self_stream ⇒ Boolean (readonly) Also known as: stream?
Returns Whether the user is streaming.
21 22 23 |
# File 'lib/discorb/voice_state.rb', line 21 def self_stream @self_stream end |
#self_video ⇒ Boolean (readonly) Also known as: video?
Returns Whether the user is video-enabled.
25 26 27 |
# File 'lib/discorb/voice_state.rb', line 25 def self_video @self_video end |
#server_deaf? ⇒ Boolean (readonly)
Returns Whether the user is deafened on the server.
|
# File 'lib/discorb/voice_state.rb', line 31
|
#server_mute? ⇒ Boolean (readonly)
Returns Whether the user is muted on the server.
|
# File 'lib/discorb/voice_state.rb', line 31
|
#session_id ⇒ Discorb::Snowflake (readonly)
Returns The ID of the guild this voice state is for.
11 12 13 |
# File 'lib/discorb/voice_state.rb', line 11 def session_id @session_id end |
#suppress ⇒ Boolean (readonly) Also known as: suppress?
Returns Whether the user is suppressed. (Is at audience).
28 29 30 |
# File 'lib/discorb/voice_state.rb', line 28 def suppress @suppress end |
#user ⇒ nil, Discorb::User (readonly)
This method returns an object from client cache. it will return nil
if the object is not in cache.
|
# File 'lib/discorb/voice_state.rb', line 31
|