Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit fd2e539

Browse files
Merge pull request #1190 from nwest/cards-against-humanity
Adjusting CAH to use respond instead of hear
2 parents 05c0b85 + 5b8986c commit fd2e539

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/scripts/hubotagainsthumanity.coffee

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
# None
99
#
1010
# Commands:
11-
# q card - Returns a question
12-
# card me - Displays an answer
13-
# card 2 - Displays two answers for questions with two blanks
11+
# hubot q card - Returns a question
12+
# hubot card me - Displays an answer
13+
# hubot card 2 - Displays two answers for questions with two blanks
1414
#
1515
# Author:
1616
# Jonny Campbell (@jonnycampbell)
@@ -794,9 +794,9 @@ answers = [
794794
]
795795

796796
module.exports = (robot) ->
797-
robot.hear /card(?: me)?(?: )(\d+)?/i, (msg) ->
797+
robot.respond /card(?: me)?(?: )(\d+)?/i, (msg) ->
798798
count = if msg.match[1]? then parseInt(msg.match[1], 10) else 1
799799
msg.send msg.random answers for i in [1..count]
800800

801-
robot.hear /q(?:uestion)? card/i, (msg) ->
801+
robot.respond /q(?:uestion)? card/i, (msg) ->
802802
msg.send msg.random questions

0 commit comments

Comments
 (0)