a little more beautiful

This commit is contained in:
Mahdi Dibaiee 2015-06-27 05:26:07 +04:30
parent 3ac4e2f7a0
commit a05b17db70
2 changed files with 4 additions and 2 deletions

View File

@ -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);
}, () => {

View File

@ -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);
}, () => {