Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling one command from another

Tags:

hubot

I want to do some kind of alias, for example, hubot status should call hubot newrelic me and hubot gauges for today.

I tried to do things like `msg.send "hubot newrelic me", but seems like hubot just ignore the message.

How can I do that?

like image 376
caarlos0 Avatar asked Aug 09 '13 03:08

caarlos0


1 Answers

You can make scripts talk one to another using events.

 robot.emit 'event', param

 robot.on 'event', (param) ->
   console.log 'received param', param

Here's more information about it: https://leanpub.com/automation-and-monitoring-with-hubot/read#leanpub-auto-cross-script-communication-with-events

like image 114
Spajus Avatar answered Nov 04 '22 16:11

Spajus