diff --git a/compiler/api/compiler.py b/compiler/api/compiler.py index d1bf8cfa..7c1412d1 100644 --- a/compiler/api/compiler.py +++ b/compiler/api/compiler.py @@ -494,17 +494,16 @@ def start(): f.write("\n 0xb0700015: \"pyrogram.client.types.ChatPhoto\",") f.write("\n 0xb0700016: \"pyrogram.client.types.ChatMember\",") f.write("\n 0xb0700017: \"pyrogram.client.types.Sticker\",") - f.write("\n 0xb0700025: \"pyrogram.client.types.GIF\",") - f.write("\n 0xb0700026: \"pyrogram.client.types.Messages\",") - f.write("\n 0xb0700018: \"pyrogram.client.types.reply_markup.ForceReply\",") f.write("\n 0xb0700019: \"pyrogram.client.types.reply_markup.InlineKeyboardButton\",") f.write("\n 0xb0700020: \"pyrogram.client.types.reply_markup.InlineKeyboardMarkup\",") f.write("\n 0xb0700021: \"pyrogram.client.types.reply_markup.KeyboardButton\",") f.write("\n 0xb0700022: \"pyrogram.client.types.reply_markup.ReplyKeyboardMarkup\",") f.write("\n 0xb0700023: \"pyrogram.client.types.reply_markup.ReplyKeyboardRemove\",") - - f.write("\n 0xb0700024: \"pyrogram.client.types.CallbackQuery\"") + f.write("\n 0xb0700024: \"pyrogram.client.types.CallbackQuery\",") + f.write("\n 0xb0700025: \"pyrogram.client.types.GIF\",") + f.write("\n 0xb0700026: \"pyrogram.client.types.Messages\",") + f.write("\n 0xb0700027: \"pyrogram.client.types.Photo\",") f.write("\n}\n") diff --git a/pyrogram/client/types/__init__.py b/pyrogram/client/types/__init__.py index acd001dd..84c12a44 100644 --- a/pyrogram/client/types/__init__.py +++ b/pyrogram/client/types/__init__.py @@ -31,6 +31,7 @@ from .location import Location from .message import Message from .message_entity import MessageEntity from .messages import Messages +from .photo import Photo from .photo_size import PhotoSize from .reply_markup import ( ForceReply, InlineKeyboardButton, InlineKeyboardMarkup, diff --git a/pyrogram/client/types/photo.py b/pyrogram/client/types/photo.py new file mode 100644 index 00000000..39fb8d94 --- /dev/null +++ b/pyrogram/client/types/photo.py @@ -0,0 +1,41 @@ +# Pyrogram - Telegram MTProto API Client Library for Python +# Copyright (C) 2017-2018 Dan Tès +# +# This file is part of Pyrogram. +# +# Pyrogram is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Pyrogram is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Pyrogram. If not, see . + +from pyrogram.api.core import Object + + +class Photo(Object): + """This object represents a Photo + + Args: + id (``str``): + Unique identifier for this photo. + + date (``int``): + Date the photo was sent in Unix time + + sizes (List of :obj:`PhotoSize ): + Available sizes of this photo + """ + + ID = 0xb0700027 + + def __init__(self, id: str, date: int, sizes: list): + self.id = id + self.date = date + self.sizes = sizes