Class: Discordrb::Events::PlayingEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/discordrb/events/presence.rb

Overview

Event raised when a user starts or stops playing a game

Instance Attribute Summary collapse

Attributes inherited from Event

#bot

Instance Method Summary collapse

Instance Attribute Details

#activityDiscordrb::Activity (readonly)



70
71
72
# File 'lib/discordrb/events/presence.rb', line 70

def activity
  @activity
end

#client_statusHash<Symbol, Symbol> (readonly)



84
85
86
# File 'lib/discordrb/events/presence.rb', line 84

def client_status
  @client_status
end

#detailsString (readonly)



# File 'lib/discordrb/events/presence.rb', line 75

#serverServer (readonly)



64
65
66
# File 'lib/discordrb/events/presence.rb', line 64

def server
  @server
end

#typeInteger (readonly)



80
# File 'lib/discordrb/events/presence.rb', line 80

delegate :url, :details, :type, to: :activity

#urlString (readonly)



# File 'lib/discordrb/events/presence.rb', line 72

#userUser (readonly)



67
68
69
# File 'lib/discordrb/events/presence.rb', line 67

def user
  @user
end

Instance Method Details

#gameString



97
98
99
# File 'lib/discordrb/events/presence.rb', line 97

def game
  @activity.name
end