Class: Rubycord::Events::VoiceServerUpdateEventHandler

Inherits:
EventHandler
  • Object
show all
Defined in:
lib/rubycord/events/voice_server_update.rb

Overview

Event handler for VoiceServerUpdateEvent

Instance Method Summary collapse

Methods inherited from EventHandler

#after_call, #call, #initialize, #match, #matches_all

Constructor Details

This class inherits a constructor from Rubycord::Events::EventHandler

Instance Method Details

#matches?(event) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rubycord/events/voice_server_update.rb', line 31

def matches?(event)
  return false unless event.is_a? VoiceServerUpdateEvent

  [
    matches_all(@attributes[:from], event.server) do |a, e|
      a == if a.is_a? String
        e.name
      else
        e
      end
    end
  ]
end