Skip to content

export Class

InlineQuery ​

extends ​

BaseClass<InlineQuery, InlineQueryPacket>

implements ​

InlineQueryPacket

Represents an incoming inline query.

Constructor ​

ts
new InlineQuery( client, packet )
ParameterTypeDescription
clientClientThe client of the incoming inline query.
packetInlineQueryPacketThe packet of the incoming inline query.

Properties ​

get user : User ​

chat_type? : "channel" | "private" | "group" | "supergroup" ​

readonly client : Client ​

from : User ​

id : string ​

location? : LocationPacket ​

offset : string ​

query : string ​

Methods ​

asyncanswer( results, button, next_offset, is_personal, cache_time ) ​

Sends an array of results to the inline query.

ParameterTypeDescription
resultsInlineQueryResultsArray of results for the inline query
button?InlineQueryResultButtonTypeThe button to be shown above inline query results
next_offset?stringPass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.
is_personal?booleanIf results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query.
cache_time?numberThe maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.

Returns: Promise<boolean>