class Discordrb::Events::ServerEmojiCDEventHandler
Generic handler for emoji create and delete
Public Instance Methods
matches?(event)
click to toggle source
# File lib/discordrb/events/guilds.rb, line 143 def matches?(event) # Check for the proper event type return false unless event.is_a? ServerEmojiCDEvent [ matches_all(@attributes[:server], event.server) do |a, e| a == case a when String e.name when Integer e.id else e end end, matches_all(@attributes[:id], event.emoji.id) { |a, e| a.resolve_id == e.resolve_id }, matches_all(@attributes[:name], event.emoji.name) { |a, e| a == e } ].reduce(true, &:&) end