mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-28 00:56:19 +00:00
Add the new Photo type
This commit is contained in:
parent
be451a3bb2
commit
5f87bbc962
@ -494,17 +494,16 @@ def start():
|
|||||||
f.write("\n 0xb0700015: \"pyrogram.client.types.ChatPhoto\",")
|
f.write("\n 0xb0700015: \"pyrogram.client.types.ChatPhoto\",")
|
||||||
f.write("\n 0xb0700016: \"pyrogram.client.types.ChatMember\",")
|
f.write("\n 0xb0700016: \"pyrogram.client.types.ChatMember\",")
|
||||||
f.write("\n 0xb0700017: \"pyrogram.client.types.Sticker\",")
|
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 0xb0700018: \"pyrogram.client.types.reply_markup.ForceReply\",")
|
||||||
f.write("\n 0xb0700019: \"pyrogram.client.types.reply_markup.InlineKeyboardButton\",")
|
f.write("\n 0xb0700019: \"pyrogram.client.types.reply_markup.InlineKeyboardButton\",")
|
||||||
f.write("\n 0xb0700020: \"pyrogram.client.types.reply_markup.InlineKeyboardMarkup\",")
|
f.write("\n 0xb0700020: \"pyrogram.client.types.reply_markup.InlineKeyboardMarkup\",")
|
||||||
f.write("\n 0xb0700021: \"pyrogram.client.types.reply_markup.KeyboardButton\",")
|
f.write("\n 0xb0700021: \"pyrogram.client.types.reply_markup.KeyboardButton\",")
|
||||||
f.write("\n 0xb0700022: \"pyrogram.client.types.reply_markup.ReplyKeyboardMarkup\",")
|
f.write("\n 0xb0700022: \"pyrogram.client.types.reply_markup.ReplyKeyboardMarkup\",")
|
||||||
f.write("\n 0xb0700023: \"pyrogram.client.types.reply_markup.ReplyKeyboardRemove\",")
|
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")
|
f.write("\n}\n")
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ from .location import Location
|
|||||||
from .message import Message
|
from .message import Message
|
||||||
from .message_entity import MessageEntity
|
from .message_entity import MessageEntity
|
||||||
from .messages import Messages
|
from .messages import Messages
|
||||||
|
from .photo import Photo
|
||||||
from .photo_size import PhotoSize
|
from .photo_size import PhotoSize
|
||||||
from .reply_markup import (
|
from .reply_markup import (
|
||||||
ForceReply, InlineKeyboardButton, InlineKeyboardMarkup,
|
ForceReply, InlineKeyboardButton, InlineKeyboardMarkup,
|
||||||
|
41
pyrogram/client/types/photo.py
Normal file
41
pyrogram/client/types/photo.py
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# Pyrogram - Telegram MTProto API Client Library for Python
|
||||||
|
# Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
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 <pyrogram.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
|
Loading…
Reference in New Issue
Block a user