From a05b17db70b33681db21a47235ce3990fe1ea0e3 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Sat, 27 Jun 2015 05:26:07 +0430 Subject: [PATCH] a little more beautiful --- README.md | 3 ++- demo.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 56021d5..92e0619 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,8 @@ smartBot.get('Hi', function(update) { const question = 'How should I greet you?', answers = [['Hi'], ['Hello, Sir'], ['Yo bro']]; - smartBot.replyTo(message.message_id).askQuestion(id, question, answers) + smartBot.replyTo(message.message_id) + .askQuestion(id, question, answers) .then(answer => { smartBot.message(id, 'Your answer: ' + answer); }, () => { diff --git a/demo.js b/demo.js index 363b75a..613a79f 100644 --- a/demo.js +++ b/demo.js @@ -18,7 +18,8 @@ smartBot.get('Hi', function(update) { const question = 'How should I greet you?', answers = [['Hi'], ['Hello, Sir'], ['Yo bro']]; - smartBot.replyTo(message.message_id).askQuestion(id, question, answers) + smartBot.replyTo(message.message_id) + .askQuestion(id, question, answers) .then(answer => { smartBot.message(id, 'Your answer: ' + answer); }, () => {