a little more beautiful
This commit is contained in:
parent
3ac4e2f7a0
commit
a05b17db70
@ -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);
|
||||
}, () => {
|
||||
|
3
demo.js
3
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);
|
||||
}, () => {
|
||||
|
Loading…
Reference in New Issue
Block a user