Method: Discordrb::EventContainer#ready

Defined in:
lib/discordrb/container.rb

#ready(attributes = {}) {|event| ... } ⇒ ReadyEventHandler

This event is raised when the READY packet is received, i.e. servers and channels have finished initialization. It's the recommended way to do things when the bot has finished starting up.

Parameters:

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

    Event attributes, none in this particular case

Yields:

  • The block is executed when the event is raised.

Yield Parameters:

  • event (ReadyEvent)

    The event that was raised.

Returns:



48
49
50
# File 'lib/discordrb/container.rb', line 48

def ready(attributes = {}, &block)
  register_event(ReadyEvent, attributes, block)
end