Class: MijDiscord::Events::UpdatePresence
- Defined in:
- lib/mij-discord/events/server.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Attributes inherited from Server
Attributes inherited from Generic
Instance Method Summary collapse
-
#initialize(bot, data) ⇒ UpdatePresence
constructor
A new instance of UpdatePresence.
Methods inherited from EventBase
delegate_method, filter_match, inherited, #trigger?
Constructor Details
#initialize(bot, data) ⇒ UpdatePresence
Returns a new instance of UpdatePresence.
73 74 75 76 77 78 79 |
# File 'lib/mij-discord/events/server.rb', line 73 def initialize(bot, data) server = @bot.server(data['guild_id']) super(bot, server) @status = data['status'].to_sym @user = @bot.user(data['user']['id']) end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
68 69 70 |
# File 'lib/mij-discord/events/server.rb', line 68 def status @status end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
66 67 68 |
# File 'lib/mij-discord/events/server.rb', line 66 def user @user end |