We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63739c6 commit 5366ac9Copy full SHA for 5366ac9
src/thank-you.coffee
@@ -32,10 +32,8 @@ response = [
32
]
33
34
module.exports = (robot) ->
35
- robot.respond /(thank).*/i, (msg) ->
+ robot.respond /thank(s| you)/i, (msg) ->
36
+ msg.send msg.random response
37
+ thanks = new RegExp "thank(s| you) #{robot.name}", "i"
38
+ robot.hear thanks, (msg) ->
39
msg.send msg.random response
-
- robot.hear /thanks? (.*)/i, (msg) ->
- name = msg.match[1]
40
- if (name.toLowerCase().indexOf robot.name.toLowerCase()) > -1
41
- msg.send msg.random response
0 commit comments