Class: Lita::Handlers::Users

Inherits:
Object
  • Object
show all
Extended by:
Lita::Handler::ChatRouter
Defined in:
lib/lita/handlers/users.rb

Overview

Provides information on Lita users.

Since:

  • 4.1.0

Instance Method Summary collapse

Methods included from Lita::Handler::ChatRouter

dispatch, dispatch_to_route, extended, route, routes

Instance Method Details

#find(response) ⇒ void

This method returns an undefined value.

Outputs the name, ID, and mention name of a user matching the search query.

Parameters:

Since:

  • 4.1.0



15
16
17
18
19
20
21
22
23
# File 'lib/lita/handlers/users.rb', line 15

def find(response)
  user = Lita::User.fuzzy_find(response.args[1])

  if user
    response.reply(formatted_user(user))
  else
    response.reply(t("find_empty_state"))
  end
end