Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# 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

  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`

  Use In

  - `telegram.Bot.answer_inline_query()`

  - `telegram.Bot.answer_web_app_query()`

  MAX_ID_LENGTH = 64

    `telegram.constants.InlineQueryResultLimit.MAX_ID_LENGTH`

    New in version 20.0.

  MIN_ID_LENGTH = 1

    `telegram.constants.InlineQueryResultLimit.MIN_ID_LENGTH`

    New in version 20.0.