Update README

This commit is contained in:
Mahdi Dibaiee 2015-06-27 04:48:09 +04:30
parent 3e49fc1c51
commit 8cd59a6a8e

View File

@ -27,8 +27,9 @@ smartBot.get('Hi', function(update) {
const message = update.message; const message = update.message;
const id = message.chat.id; const id = message.chat.id;
// answers is in format of keyboard rows
const question = 'How should I greet you?', const question = 'How should I greet you?',
answers = ['Hi', 'Hello, Sir', 'Yo bro']; 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 => { .then(answer => {
@ -49,7 +50,6 @@ smartBot.command('test', update => {
smartBot.command('start', update => { smartBot.command('start', update => {
smartBot.message(update.message.chat.id, 'Hello!'); smartBot.message(update.message.chat.id, 'Hello!');
}); });
// You can access all API methods through the api property until we implement // You can access all API methods through the api property until we implement
// easier methods // easier methods
smartBot.api.getUserProfilePhotos smartBot.api.getUserProfilePhotos