telegram.inlinequeryresultgif module¶
This module contains the classes that represent Telegram InlineQueryResultGif
-
class
telegram.inlinequeryresultgif.InlineQueryResultGif(id, gif_url, thumb_url, gif_width=None, gif_height=None, title=None, caption=None, reply_markup=None, input_message_content=None, **kwargs)¶ Bases:
telegram.inlinequeryresult.InlineQueryResultRepresents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
-
gif_url¶ str – A valid URL for the GIF file. File size must not exceed 1MB.
-
thumb_url¶ str – URL of the static thumbnail for the result (jpeg or gif).
-
gif_width¶ Optional[int] – Width of the GIF.
-
gif_height¶ Optional[int] – Height of the GIF.
-
title¶ Optional[str] – Title for the result.
-
caption¶ Optional[str] – Caption of the GIF file to be sent, 0-200 characters.
-
reply_markup¶ Optional[
telegram.InlineKeyboardMarkup] – Inline keyboard attached to the message.
-
input_message_content¶ Optional[
telegram.InputMessageContent] – Content of the message to be sent instead of the GIF animation.
Parameters: - id (str) –
- gif_url (str) –
- thumb_url (str) –
- gif_width (Optional[int]) –
- gif_height (Optional[int]) –
- title (Optional[str]) –
- caption (Optional[str]) –
- reply_markup (Optional[
telegram.InlineKeyboardMarkup]) – - input_message_content (Optional[
telegram.InputMessageContent]) – - **kwargs (dict) – Arbitrary keyword arguments.
-
static
de_json(data, bot)¶
-