Airgram

Guides
/
/
Methods

api.getInlineQueryResults()

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 GetInlineQueryResultsParams:

NameTypeDescription
botUserIdnumber The identifier of the target bot
chatIdnumber Identifier of the chat where the query was sent
userLocation Location of the user; pass null if unknown or the bot doesn't need user's location
querystring Text of the query
offsetstring Offset of the first entry to return
Returns ApiResponse interface:
interface ApiResponse {
  _: 'getInlineQueryResults' | 'error'
  airgram: Airgram
  request: {
    method: 'getInlineQueryResults'
    params: GetInlineQueryResultsParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}