From 3a156c787f28cdf30bbba32d9f524b5345af7d1f Mon Sep 17 00:00:00 2001 From: Oleg Batalin Date: Wed, 24 Feb 2016 13:19:53 +0300 Subject: [PATCH] new controller - how old are you --- bot.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bot.js b/bot.js index 3bcc11607..4f14dacfd 100755 --- a/bot.js +++ b/bot.js @@ -211,6 +211,12 @@ controller.hears(['uptime','identify yourself','who are you','what is your name' }); +controller.hears(['how old are you'],'direct_message,direct_mention,mention',function(bot, message) { + + bot.reply(message,':robot_face: I am a bot named <@' + bot.identity.name + '>. I am ' + uptime + ' old'); + +}); + function formatUptime(uptime) { var unit = 'second'; if (uptime > 60) {