Naltox / telegram-node-bot

Node module for creating Telegram bots.
MIT License
723 stars 143 forks source link

inlineMode not working? #47

Closed polyakovyevgeniy closed 8 years ago

polyakovyevgeniy commented 8 years ago

Hi! I'm trying to use the inlineMode mode, but it does not work. There is no response when I enter '@' in the input field. Here is my code:

`var bot = require('telegram-node-bot')(token); bot.inlineMode(($) => { var results = [];

for(var i = 0; i < 51; i++){
    results.push({
        type: 'gif',
        gif_url: 'http://thecatapi.com/api/images/get?format=src&size=med&type=gif&uid=' + Math.random().toString(36).substring(2),
        gif_width: 250,
        gif_height: 250,
        thumb_url: 'http://thecatapi.com/api/images/get?format=src&size=small&type=gif&uid=' + Math.random().toString(36).substring(2)
    });
}
$.paginatedAnswer(results, 10);

}); `

BotFather I sent /setinline

Naltox commented 8 years ago

Hi! Just testet that code and it's work for me, are you sure enabled inline mode in BotFather? You should not only send /setinline to BotFather, you also should send him the placeholder text.