Method: Discordrb::EventContainer#raw

Defined in:
lib/discordrb/container.rb

#raw(attributes = {}) {|event| ... } ⇒ RawEventHandler

This event is raised for every dispatch received over the gateway, whether supported by discordrb or not.

Parameters:

  • attributes (Hash) (defaults to: {})

    The event's attributes.

Options Hash (attributes):

  • :type (String, Symbol, Regexp)

    Matches the event type of the dispatch.

Yields:

  • The block is executed when the event is raised.

Yield Parameters:

  • event (RawEvent)

    The event that was raised.

Returns:



585
586
587
# File 'lib/discordrb/container.rb', line 585

def raw(attributes = {}, &block)
  register_event(RawEvent, attributes, block)
end