Module telegram-bot-lua.methods.inline
inline API methods.
Functions
Functions
- api.answer_callback_query(callback_query_id, opts)
-
send answers to callback queries sent from inline keyboards.
Parameters:
- callback_query_id string unique identifier for the query to be answered
- opts table optional parameters (text, showalert, url, cachetime)
Returns:
- table|false true on success, or false on failure
- string|table the HTTP status or error details
- api.answer_inline_query(inline_query_id, results, opts)
-
send answers to an inline query.
Parameters:
- inline_query_id string unique identifier for the answered query
- results string|table JSON-serialised array of InlineQueryResult or a table thereof
- opts table optional parameters (cachetime, ispersonal, next_offset, button)
Returns:
- table|false true on success, or false on failure
- string|table the HTTP status or error details
- api.answer_web_app_query(web_app_query_id, result)
-
set the result of an interaction with a web app and send a message on behalf of the user.
Parameters:
- web_app_query_id string unique identifier for the query to be answered
- result string|table an InlineQueryResult object describing the message to send
Returns:
- table|false the sent message, or false on failure
- string|table the HTTP status or error details
- api.send_inline_article(inline_query_id, title, description, message_text, parse_mode, reply_markup)
-
convenience helper to answer an inline query with a single article result.
Parameters:
- inline_query_id string unique identifier for the answered query
- title string title of the article
- description string short description of the result
- message_text string text of the message to be sent
- parse_mode string|boolean parse mode for the message text (true for MarkdownV2)
- reply_markup table an InlineKeyboardMarkup object
Returns:
- table|false true on success, or false on failure
- string|table the HTTP status or error details
- api.send_inline_article_url(inline_query_id, title, url, hide_url, input_message_content, reply_markup, id)
-
convenience helper to answer an inline query with a URL article result.
Parameters:
- inline_query_id string unique identifier for the answered query
- title string title of the article
- url string URL of the result
- hide_url boolean whether to hide the URL in the message
- input_message_content table content of the message to be sent
- reply_markup table an InlineKeyboardMarkup object
- id string|number optional custom result identifier (defaults to '1')
Returns:
- table|false true on success, or false on failure
- string|table the HTTP status or error details
- api.send_inline_cached_photo(inline_query_id, photo_file_id, caption, reply_markup)
-
convenience helper to answer an inline query with a cached photo result.
Parameters:
- inline_query_id string unique identifier for the answered query
- photo_file_id string file identifier of a previously uploaded photo
- caption string caption for the photo
- reply_markup table an InlineKeyboardMarkup object
Returns:
- table|false true on success, or false on failure
- string|table the HTTP status or error details
- api.send_inline_photo(inline_query_id, photo_url, caption, reply_markup)
-
convenience helper to answer an inline query with a photo result by URL.
Parameters:
- inline_query_id string unique identifier for the answered query
- photo_url string a valid URL of the photo
- caption string caption for the photo
- reply_markup table an InlineKeyboardMarkup object
Returns:
- table|false true on success, or false on failure
- string|table the HTTP status or error details