Inline Bot
Support with BJS - command /inlineQuery
// result.query - it is query from inline searching
if(!request.query){ return }
results = [];
totalResult = 0;
// it is array of results.
// we have InlineQueryResultArticle
// core.telegram.org/bots/api#inlinequeryresultarticle
// another types: https://core.telegram.org/bots/api#inlinequeryresult
results.push({
type: "article",
id: totalResult,
title: "Text for item",
input_message_content:
{ "message_text": "This message will be in chat" }
})
Api.answerInlineQuery({
// see another fields at:
// core.telegram.org/bots/api#answerinlinequery
inline_query_id: request.id,
results: results,
cache_time: 30000 // cache time in sec
})Last updated