class Discordrb::Events::PlayingEventHandler
Event
handler for PlayingEvent
Public Instance Methods
matches?(event)
click to toggle source
# File lib/discordrb/events/presence.rb, line 89 def matches?(event) # Check for the proper event type return false unless event.is_a? PlayingEvent [ matches_all(@attributes[:from], event.user) do |a, e| a == if a.is_a? String e.name elsif a.is_a? Integer e.id else e end end, matches_all(@attributes[:game], event.game) do |a, e| a == e end, matches_all(@attributes[:type], event.type) do |a, e| a == e end ].reduce(true, &:&) end