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

# InlineQueryResultCachedSticker

class telegram.InlineQueryResultCachedSticker(id, sticker_file_id, reply_markup=None, input_message_content=None, *, api_kwargs=None)

  Bases: `telegram.InlineQueryResult`

  Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use `input_message_content` to send a message with the specified content instead of the sticker.

  Use In

  - `telegram.Bot.answer_inline_query()`

  - `telegram.Bot.answer_web_app_query()`

  See also

  Working with Files and Media

  Parameters:

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

    - sticker_file_id (`str`) – A valid file identifier of the sticker.

    - reply_markup (`telegram.InlineKeyboardMarkup`, optional) – Inline keyboard attached to the message.

    - input_message_content (`telegram.InputMessageContent`, optional) – Content of the message to be sent instead of the sticker.

  type

    `'sticker'`.

    Type:

      `str`

  id

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

    Type:

      `str`

  sticker_file_id

    A valid file identifier of the sticker.

    Type:

      `str`

  reply_markup

    Optional. Inline keyboard attached to the message.

    Type:

      `telegram.InlineKeyboardMarkup`

  input_message_content

    Optional. Content of the message to be sent instead of the sticker.

    Type:

      `telegram.InputMessageContent`