Created
October 28, 2011 00:23
-
-
Save dannymcc/1321286 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Polite. | |
| # | |
| # Say thanks to your robot. | |
| responses = [ | |
| "You're welcome", | |
| "No problem", | |
| "Anytime", | |
| "That's what I'm here for!", | |
| "You are more than welcome", | |
| "You don't have to thank me, I'm your loyal servant", | |
| "Don't mention it." | |
| ] | |
| regex = new RegExp("(thanks|cheers|thank you|nice one) #{robot.name}", i) | |
| robot.hear regex, (msg) -> | |
| msg.send msg.random responses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment