Class: Lita::Handlers::Room

Inherits:
Lita::Handler show all
Defined in:
lib/lita/handlers/room.rb

Overview

Allows administrators to make Lita join and part from rooms.

Since:

  • 3.0.0

Instance Method Summary collapse

Methods included from Lita::Handler::EventRouter

#event_subscriptions_for, extended, #on, #trigger

Methods included from Lita::Handler::HTTPRouter

extended, #http, #http_routes

Methods included from Lita::Handler::ChatRouter

#dispatch, #dispatch_to_route, extended, #route, #routes

Instance Method Details

#join(response) ⇒ void

This method returns an undefined value.

Joins the room with the specified ID.

Since:

  • 3.0.0



18
19
20
# File 'lib/lita/handlers/room.rb', line 18

def join(response)
  robot.join(response.args[0])
end

#part(response) ⇒ void

This method returns an undefined value.

Parts from the room with the specified ID.

Since:

  • 3.0.0



25
26
27
# File 'lib/lita/handlers/room.rb', line 25

def part(response)
  robot.part(response.args[0])
end