From 95b5aed3c63166c8f11f6061ae71ecd649ec7835 Mon Sep 17 00:00:00 2001 From: Zhuohuan LI Date: Tue, 28 Jun 2016 14:38:37 +0800 Subject: [PATCH] tmp act as ding-dong for test --- bin/io-bot.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/io-bot.js b/bin/io-bot.js index 91ca6943..7723c56f 100644 --- a/bin/io-bot.js +++ b/bin/io-bot.js @@ -51,6 +51,12 @@ const onMessage = function(m) { , from.name() , m.toStringDigest() ) + + if (/^(ding|ping|bing)$/i.test(m.get('content')) && !bot.self(m)) { + bot.reply(m, 'dong') + .then(() => { log.info('Bot', 'REPLY: dong') }) + } + } /** * -- GitLab