Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 34 lines (32 sloc) 0.786 kb
5748f33 @marioBonales Hubot, be polite and say hello
marioBonales authored
1 # Description:
2 # Hubot, be polite and say hello.
3 #
4 # Dependencies:
5 # None
6 #
7 # Configuration:
8 # None
9 #
10 # Commands:
11 # Hello or Good Day make hubot say hello to you back
12 # Good Morning makes hubot say good morning to you back
13 hellos = [
14 "Well hello there, %",
15 "Hey %, Hello!",
16 "Marnin', %",
17 "Good day, %",
18 "Good 'aye!, %"
19 ]
20 mornings = [
21 "Good morning, %",
22 "Good morning to you too, %",
23 "Good day, %",
24 "Good 'aye!, %"
25 ]
26 module.exports = (robot) ->
27 robot.hear /(hello|good( [d'])?ay(e)?)/i, (msg) ->
28 hello = msg.random hellos
29 msg.send hello.replace "%", msg.message.user.name
30
31 robot.hear /(^(good )?m(a|o)rnin(g)?)/i, (msg) ->
32 hello = msg.random mornings
33 msg.send hello.replace "%", msg.message.user.name
Something went wrong with that request. Please try again.