InputWidgetMessageContent

class pyrogram.types.InputWidgetMessageContent[source]

Content of a message with an HTML widget to be sent as the result of an inline query. Currently, widgets can’t be sent in response to inline queries in the production environment.

Parameters:
  • html (str) – HTML code of the widget, 1-32768 bytes. The code must not exceed 4096 bytes when compressed by zlib with the maximum compression level.

  • width (int, optional) – Width of the widget in logical pixels; omit if the widget must occupy the whole width of the message bubble.

  • height (int, optional) – Height of the widget in logical pixels; omit if the height of the widget isn’t fixed.

  • public_data (str, optional) – Public data of the widget, 0-1024 bytes, which will be available wherever the widget is shown.

  • chat_data (str, optional) – Data of the widget, which is specific to the message, 0-1024 bytes.

  • caption (str, optional) – Widget caption, 0-1024 characters after entities parsing.

  • parse_mode (ParseMode, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.

  • caption_entities (List of MessageEntity, optional) – List of special entities that appear in the caption, which can be specified instead of parse_mode.

  • show_caption_above_media (bool, optional) – Pass True if the caption must be shown above the widget.

  • allow_queries (bool, optional) – Pass True to allow the widget to send queries to the bot.

  • is_shared (bool, optional) – Pass True to create a shared widget. Each message sent from the result creates a separate shared widget.