Skip to content
Back to top
View this page

# InlineQueryResult

class telegram.InlineQueryResult(type, id, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  Baseclass for the InlineQueryResult* classes.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `id` is equal.

  Note

  All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.

  Examples

  Inline Bot

  Use In

  - `telegram.Bot.answer_guest_query()`

  - `telegram.Bot.answer_inline_query()`

  - `telegram.Bot.answer_web_app_query()`

  - `telegram.Bot.save_prepared_inline_message()`

  Parameters:

    - type (`str`) – Type of the result.

    - id (`str`) – Unique identifier for this result, `1`- `64` Bytes.

  type

    Type of the result.

    Type:

      `str`

  id

    Unique identifier for this result, `1`- `64` Bytes.

    Type:

      `str`

  MAX_ID_LENGTH = 64

    `telegram.constants.InlineQueryResultLimit.MAX_ID_LENGTH`

    Added in version 20.0.

  MIN_ID_LENGTH = 1

    `telegram.constants.InlineQueryResultLimit.MIN_ID_LENGTH`

    Added in version 20.0.