From 723dbae5a8646588c6c4bb306c16918308d81a7f Mon Sep 17 00:00:00 2001 From: Yago Date: Tue, 20 Oct 2015 09:47:58 +0200 Subject: [PATCH] Update polling.js --- examples/polling.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/polling.js b/examples/polling.js index e891ccf..7dccf4b 100644 --- a/examples/polling.js +++ b/examples/polling.js @@ -12,6 +12,7 @@ bot.getMe().then(function (me) { console.log('Hi my name is %s!', me.username); }); +// Matches /photo bot.onText(/\/photo/, function (msg) { var chatId = msg.chat.id; // From file @@ -19,6 +20,7 @@ bot.onText(/\/photo/, function (msg) { bot.sendPhoto(chatId, photo, {caption: "I'm a bot!"}); }); +// Matches /audio bot.onText(/\/audio/, function (msg) { var chatId = msg.chat.id; var url = 'https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg'; @@ -32,6 +34,7 @@ bot.onText(/\/audio/, function (msg) { }); }); +// Matches /love bot.onText(/\/love/, function (msg) { var chatId = msg.chat.id; var opts = {