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

Commit ab0c2e4

Browse files
committed
Improve regexp of destiny script.
Before it only mached when having a space at the end, e.g. "is it pizza day ?", now the space is optional and it also matches "is it pizza day?".
1 parent 47890ea commit ab0c2e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/destiny.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# KuiKui
1515

1616
module.exports = (robot) ->
17-
robot.respond /is it (\w+) day \?/i, (msg) ->
17+
robot.respond /is it (\w+) day ?\?/i, (msg) ->
1818
action = msg.match[1]
1919
nbDay = Math.floor(new Date().getTime() / 1000 / 86400)
2020
actionHash = action.length + action.charCodeAt(0) + action.charCodeAt(action.length - 1)

0 commit comments

Comments
 (0)