Class: Cinch::Plugins::Wit
- Inherits:
-
Object
- Object
- Cinch::Plugins::Wit
- Includes:
- Cinch::Plugin
- Defined in:
- lib/cinch/wit.rb
Instance Method Summary collapse
-
#execute(msg, message) ⇒ Object
Send a message to the Wit API and dispatch an event with the outcome.
Instance Method Details
#execute(msg, message) ⇒ Object
Send a message to the Wit API and dispatch an event with the outcome.
17 18 19 20 21 22 |
# File 'lib/cinch/wit.rb', line 17 def execute(msg, ) wit_response = wit_client.(.strip) outcome = wit_response['outcome'] debug outcome.to_s msg.bot.handlers.dispatch :intent, msg, outcome end |