2017-10-12 16:43:23 +03:00
|
|
|
from . import base
|
|
|
|
|
from . import fields
|
2018-01-24 02:29:48 +02:00
|
|
|
from . import mixins
|
2017-10-12 16:43:23 +03:00
|
|
|
from .photo_size import PhotoSize
|
- Renamed the field thumb in the classes Animation, Audio, Document, Sticker, Video, VideoNote, InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaVideo, StickerSet to thumbnail.
- Renamed the fields thumb_url, thumb_width, and thumb_height in the classes InlineQueryResultArticle, InlineQueryResultContact, InlineQueryResultDocument, InlineQueryResultLocation, and InlineQueryResultVenue to thumbnail_url, thumbnail_width, and thumbnail_height respectively.
- Renamed the field thumb_url in the classes InlineQueryResultPhoto and InlineQueryResultVideo to thumbnail_url.
- Renamed the fields thumb_url and thumb_mime_type in the classes InlineQueryResultGif, and InlineQueryResultMpeg4Gif to thumbnail_url and thumbnail_mime_type respectively.
2023-03-22 18:14:27 +02:00
|
|
|
from ..utils.deprecated import warn_deprecated
|
2017-10-12 16:43:23 +03:00
|
|
|
|
|
|
|
|
|
2018-01-24 02:29:48 +02:00
|
|
|
class Animation(base.TelegramObject, mixins.Downloadable):
|
2017-10-12 16:43:23 +03:00
|
|
|
"""
|
|
|
|
|
You can provide an animation for your game so that it looks stylish in chats
|
|
|
|
|
(check out Lumberjack for an example).
|
|
|
|
|
This object represents an animation file to be displayed in the message containing a game.
|
|
|
|
|
|
|
|
|
|
https://core.telegram.org/bots/api#animation
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
file_id: base.String = fields.Field()
|
2019-12-31 22:46:08 +05:00
|
|
|
file_unique_id: base.String = fields.Field()
|
2020-09-14 00:07:29 +05:00
|
|
|
width: base.Integer = fields.Field()
|
|
|
|
|
height: base.Integer = fields.Field()
|
|
|
|
|
duration: base.Integer = fields.Field()
|
- Renamed the field thumb in the classes Animation, Audio, Document, Sticker, Video, VideoNote, InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaVideo, StickerSet to thumbnail.
- Renamed the fields thumb_url, thumb_width, and thumb_height in the classes InlineQueryResultArticle, InlineQueryResultContact, InlineQueryResultDocument, InlineQueryResultLocation, and InlineQueryResultVenue to thumbnail_url, thumbnail_width, and thumbnail_height respectively.
- Renamed the field thumb_url in the classes InlineQueryResultPhoto and InlineQueryResultVideo to thumbnail_url.
- Renamed the fields thumb_url and thumb_mime_type in the classes InlineQueryResultGif, and InlineQueryResultMpeg4Gif to thumbnail_url and thumbnail_mime_type respectively.
2023-03-22 18:14:27 +02:00
|
|
|
thumbnail: PhotoSize = fields.Field(base=PhotoSize)
|
2017-10-12 16:43:23 +03:00
|
|
|
file_name: base.String = fields.Field()
|
|
|
|
|
mime_type: base.String = fields.Field()
|
|
|
|
|
file_size: base.Integer = fields.Field()
|
- Renamed the field thumb in the classes Animation, Audio, Document, Sticker, Video, VideoNote, InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaVideo, StickerSet to thumbnail.
- Renamed the fields thumb_url, thumb_width, and thumb_height in the classes InlineQueryResultArticle, InlineQueryResultContact, InlineQueryResultDocument, InlineQueryResultLocation, and InlineQueryResultVenue to thumbnail_url, thumbnail_width, and thumbnail_height respectively.
- Renamed the field thumb_url in the classes InlineQueryResultPhoto and InlineQueryResultVideo to thumbnail_url.
- Renamed the fields thumb_url and thumb_mime_type in the classes InlineQueryResultGif, and InlineQueryResultMpeg4Gif to thumbnail_url and thumbnail_mime_type respectively.
2023-03-22 18:14:27 +02:00
|
|
|
|
2023-03-22 18:36:45 +02:00
|
|
|
@property
|
|
|
|
|
def thumb(self):
|
|
|
|
|
warn_deprecated(
|
|
|
|
|
"thumb is deprecated. Use thumbnail instead",
|
- Renamed the field thumb in the classes Animation, Audio, Document, Sticker, Video, VideoNote, InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaVideo, StickerSet to thumbnail.
- Renamed the fields thumb_url, thumb_width, and thumb_height in the classes InlineQueryResultArticle, InlineQueryResultContact, InlineQueryResultDocument, InlineQueryResultLocation, and InlineQueryResultVenue to thumbnail_url, thumbnail_width, and thumbnail_height respectively.
- Renamed the field thumb_url in the classes InlineQueryResultPhoto and InlineQueryResultVideo to thumbnail_url.
- Renamed the fields thumb_url and thumb_mime_type in the classes InlineQueryResultGif, and InlineQueryResultMpeg4Gif to thumbnail_url and thumbnail_mime_type respectively.
2023-03-22 18:14:27 +02:00
|
|
|
)
|
2023-03-22 18:36:45 +02:00
|
|
|
return self.thumbnail
|