Class: Discorb::Presence
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- Discorb::Presence
- Defined in:
- lib/discorb/presence.rb
Overview
Represents a presence of user.
Defined Under Namespace
Classes: Activity, ClientStatus
Instance Attribute Summary collapse
-
#activities ⇒ Array<Discorb::Presence::Activity>
readonly
The activities of the user.
-
#activity ⇒ Discorb::Presence::Activity
readonly
The activity of the presence.
-
#client_status ⇒ Discorb::Presence::ClientStatus
readonly
The client status of the user.
-
#guild ⇒ Discorb::Guild
readonly
The guild of the presence.
-
#status ⇒ :online, ...
readonly
The status of the user.
-
#user ⇒ Discorb::User
readonly
The user of the presence.
Instance Method Summary collapse
Methods inherited from DiscordModel
Instance Attribute Details
#activities ⇒ Array<Discorb::Presence::Activity> (readonly)
Returns The activities of the user.
11 12 13 |
# File 'lib/discorb/presence.rb', line 11 def activities @activities end |
#activity ⇒ Discorb::Presence::Activity (readonly)
Returns The activity of the presence.
|
# File 'lib/discorb/presence.rb', line 15
|
#client_status ⇒ Discorb::Presence::ClientStatus (readonly)
Returns The client status of the user.
13 14 15 |
# File 'lib/discorb/presence.rb', line 13 def client_status @client_status end |
#guild ⇒ Discorb::Guild (readonly)
Returns The guild of the presence.
|
# File 'lib/discorb/presence.rb', line 15
|
#status ⇒ :online, ... (readonly)
Returns The status of the user.
9 10 11 |
# File 'lib/discorb/presence.rb', line 9 def status @status end |
#user ⇒ Discorb::User (readonly)
Returns The user of the presence.
|
# File 'lib/discorb/presence.rb', line 15
|
Instance Method Details
#inspect ⇒ Object
47 48 49 |
# File 'lib/discorb/presence.rb', line 47 def inspect "#<#{self.class} @status=#{@status.inspect} @activity=#{activity.inspect}>" end |