Skip to content

get inline query results

Alexey Kravtsov edited this page May 19, 2020 · 1 revision

libtd-ktx / kotlinx.telegram.coroutines / getInlineQueryResults

getInlineQueryResults

suspend fun TelegramFlow.getInlineQueryResults(botUserId: Int, chatId: Long, userLocation: Location?, query: String?, offset: String?): InlineQueryResults

Suspend function, which sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires.

Parameters

botUserId - The identifier of the target bot.

chatId - Identifier of the chat where the query was sent.

userLocation - Location of the user, only if needed.

query - Text of the query.

offset - Offset of the first entry to return.

Return InlineQueryResults Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query.

Clone this wiki locally