class Discordrb::Events::PresenceEvent
Event
raised when a user's presence state updates (idle or online)
Attributes
server[R]
@return [Server] the server on which the presence update happened.
status[R]
@return [Symbol] the new status.
user[R]
@return [User] the user whose status got updated.
Public Class Methods
new(data, bot)
click to toggle source
# File lib/discordrb/events/presence.rb, line 18 def initialize(data, bot) @bot = bot @user = bot.user(data['user']['id'].to_i) @status = data['status'].to_sym @server = bot.server(data['guild_id'].to_i) end