Created
April 10, 2016 09:34
-
-
Save codeaholicguy/3105f170430e360ba762a0051e5fdda9 to your computer and use it in GitHub Desktop.
This file contains 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
controller.hears( | |
['xin chào', 'chào mày'], | |
['direct_message', 'direct_mention', 'mention'], | |
function(bot, message) { | |
controller.storage.users.get(message.user, function(err, user) { | |
if (user && user.name) { | |
bot.reply(message, 'ờ chào ' + user.name + '!') | |
} else { | |
bot.reply(message, 'chào!') | |
} | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment