Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Created Apr 10, 2016
Embed
What would you like to do?
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