class MijDiscord::Events::StartTyping
Attributes
channel[R]
timestamp[R]
user[R]
Public Class Methods
new(bot, data)
click to toggle source
Calls superclass method
MijDiscord::Events::Generic::new
# File lib/mij-discord/events/message.rb, line 91 def initialize(bot, data) super(bot) @timestamp = Time.at(data['timestamp'].to_i).utc @channel = @bot.channel(data['channel_id']) @user = if @channel.pm? @channel.recipient elsif @channel.group? @bot.user(data['user_id']) else @bot.member(@channel.server, data['user_id']) end end