Class: RubyCord::User::Presence

Inherits:
DiscordModel show all
Defined in:
lib/rubycord/user/presence.rb

Overview

Represents a presence of user.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DiscordModel

#==, #eql?

Instance Attribute Details

#activitiesArray<RubyCord::User::Activity> (readonly)

Returns The activities of the user.

Returns:



11
12
13
# File 'lib/rubycord/user/presence.rb', line 11

def activities
  @activities
end

#activityRubyCord::User::Activity (readonly)

Returns The activity of the presence.

Returns:



# File 'lib/rubycord/user/presence.rb', line 15

#client_statusRubyCord::Client::User::Status (readonly)

Returns The client status of the user.

Returns:



13
14
15
# File 'lib/rubycord/user/presence.rb', line 13

def client_status
  @client_status
end

#guildRubyCord::Guild (readonly)

Returns The guild of the presence.

Returns:



# File 'lib/rubycord/user/presence.rb', line 15

#status:online, ... (readonly)

Returns The status of the user.

Returns:

  • (:online, :idle, :dnd, :offline)

    The status of the user.



9
10
11
# File 'lib/rubycord/user/presence.rb', line 9

def status
  @status
end

#userRubyCord::User (readonly)

Returns The user of the presence.

Returns:



# File 'lib/rubycord/user/presence.rb', line 15

Instance Method Details

#inspectObject



47
48
49
# File 'lib/rubycord/user/presence.rb', line 47

def inspect
  "#<#{self.class} @status=#{@status.inspect} @activity=#{activity.inspect}>"
end