diff --git a/pyrogram/client/types/audio.py b/pyrogram/client/types/audio.py index 2cf7bbfb..eb50d2ed 100644 --- a/pyrogram/client/types/audio.py +++ b/pyrogram/client/types/audio.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class Audio(Object): - ID = 0xb0700006 - """This object represents an audio file to be treated as music by the Telegram clients. Attributes: @@ -56,6 +54,8 @@ class Audio(Object): Title of the audio as defined by sender or by audio tags. """ + ID = 0xb0700006 + def __init__( self, file_id: str, diff --git a/pyrogram/client/types/chat.py b/pyrogram/client/types/chat.py index b9544a8e..500f0031 100644 --- a/pyrogram/client/types/chat.py +++ b/pyrogram/client/types/chat.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class Chat(Object): - ID = 0xb0700002 - """This object represents a chat. Attributes: @@ -68,9 +66,10 @@ class Chat(Object): can_set_sticker_set (``bool``, *optional*): True, if the bot can change the group sticker set. Returned only in getChat. - """ + ID = 0xb0700002 + def __init__( self, id: int, diff --git a/pyrogram/client/types/chat_member.py b/pyrogram/client/types/chat_member.py index f8fb91c3..6c5a60dd 100644 --- a/pyrogram/client/types/chat_member.py +++ b/pyrogram/client/types/chat_member.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class ChatMember(Object): - ID = 0xb0700016 - """This object contains information about one member of a chat. Attributes: @@ -81,9 +79,10 @@ class ChatMember(Object): can_add_web_page_previews (``bool``, *optional*): Restricted only. True, if user may add web page previews to his messages, implies can_send_media_messages. - """ + ID = 0xb0700016 + def __init__( self, user, diff --git a/pyrogram/client/types/chat_photo.py b/pyrogram/client/types/chat_photo.py index 8a91530d..667b5fbc 100644 --- a/pyrogram/client/types/chat_photo.py +++ b/pyrogram/client/types/chat_photo.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class ChatPhoto(Object): - ID = 0xb0700015 - """This object represents a chat photo. Attributes: @@ -33,9 +31,10 @@ class ChatPhoto(Object): big_file_id (``str``): Unique file identifier of big (640x640) chat photo. This file_id can be used only for photo download. - """ + ID = 0xb0700015 + def __init__(self, small_file_id: str, big_file_id: str): self.small_file_id = small_file_id # string self.big_file_id = big_file_id # string diff --git a/pyrogram/client/types/contact.py b/pyrogram/client/types/contact.py index 50f033f4..77ac07bf 100644 --- a/pyrogram/client/types/contact.py +++ b/pyrogram/client/types/contact.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class Contact(Object): - ID = 0xb0700011 - """This object represents a phone contact. Attributes: @@ -41,6 +39,8 @@ class Contact(Object): Contact's user identifier in Telegram. """ + ID = 0xb0700011 + def __init__(self, phone_number: str, first_name: str, last_name: str = None, user_id=None): self.phone_number = phone_number # string self.first_name = first_name # string diff --git a/pyrogram/client/types/document.py b/pyrogram/client/types/document.py index df149187..29feaf28 100644 --- a/pyrogram/client/types/document.py +++ b/pyrogram/client/types/document.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class Document(Object): - ID = 0xb0700007 - """This object represents a general file (as opposed to photos, voice messages and audio files). Attributes: @@ -47,6 +45,8 @@ class Document(Object): Date the document was sent in Unix time. """ + ID = 0xb0700007 + def __init__( self, file_id: str, diff --git a/pyrogram/client/types/location.py b/pyrogram/client/types/location.py index 5e4829d9..28bbb851 100644 --- a/pyrogram/client/types/location.py +++ b/pyrogram/client/types/location.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class Location(Object): - ID = 0xb0700012 - """This object represents a point on the map. Attributes: @@ -35,6 +33,8 @@ class Location(Object): Latitude as defined by sender. """ + ID = 0xb0700012 + def __init__(self, longitude: float, latitude: float): self.longitude = longitude # double self.latitude = latitude # double diff --git a/pyrogram/client/types/message.py b/pyrogram/client/types/message.py index 6703a280..4dc19177 100644 --- a/pyrogram/client/types/message.py +++ b/pyrogram/client/types/message.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class Message(Object): - ID = 0xb0700003 - """This object represents a message. Attributes: @@ -196,6 +194,10 @@ class Message(Object): Only applicable when using :obj:`Filters.command `. """ + # TODO: Document missing arguments + + ID = 0xb0700003 + def __init__( self, message_id: int, diff --git a/pyrogram/client/types/message_entity.py b/pyrogram/client/types/message_entity.py index 54d045b2..a3d7a174 100644 --- a/pyrogram/client/types/message_entity.py +++ b/pyrogram/client/types/message_entity.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class MessageEntity(Object): - ID = 0xb0700004 - """This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. @@ -46,9 +44,10 @@ class MessageEntity(Object): user (:obj:`User `, *optional*): For "text_mention" only, the mentioned user. - """ + ID = 0xb0700004 + def __init__(self, type: str, offset: int, length: int, url: str = None, user=None): self.type = type # string self.offset = offset # int diff --git a/pyrogram/client/types/photo_size.py b/pyrogram/client/types/photo_size.py index 45c36b9c..fa59acdd 100644 --- a/pyrogram/client/types/photo_size.py +++ b/pyrogram/client/types/photo_size.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class PhotoSize(Object): - ID = 0xb0700005 - """This object represents one size of a photo or a file / sticker thumbnail. Attributes: @@ -44,6 +42,8 @@ class PhotoSize(Object): Date the photo was sent in Unix time """ + ID = 0xb0700005 + def __init__(self, file_id, width, height, file_size=None, date=None): self.file_id = file_id # string self.width = width # int diff --git a/pyrogram/client/types/sticker.py b/pyrogram/client/types/sticker.py index e6f3bff3..6eb59990 100644 --- a/pyrogram/client/types/sticker.py +++ b/pyrogram/client/types/sticker.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class Sticker(Object): - ID = 0xb0700017 - """This object represents a sticker. Attributes: @@ -62,6 +60,8 @@ class Sticker(Object): For mask stickers, the position where the mask should be placed. """ + ID = 0xb0700017 + def __init__( self, file_id: str, diff --git a/pyrogram/client/types/update.py b/pyrogram/client/types/update.py index c4b42bdd..a8bd2044 100644 --- a/pyrogram/client/types/update.py +++ b/pyrogram/client/types/update.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class Update(Object): - ID = 0xb0700000 - """This object represents an incoming update. At most one of the optional parameters can be present in any given update. @@ -57,9 +55,10 @@ class Update(Object): pre_checkout_query (:obj:`PreCheckoutQuery `, *optional*): New incoming pre-checkout query. Contains full information about checkout. - """ + ID = 0xb0700000 + def __init__( self, message=None, diff --git a/pyrogram/client/types/user.py b/pyrogram/client/types/user.py index 48a99157..beabf200 100644 --- a/pyrogram/client/types/user.py +++ b/pyrogram/client/types/user.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class User(Object): - ID = 0xb0700001 - """This object represents a Telegram user or bot. Attributes: @@ -53,6 +51,8 @@ class User(Object): User's or bot's current profile photo. """ + ID = 0xb0700001 + def __init__( self, id: int, diff --git a/pyrogram/client/types/user_profile_photos.py b/pyrogram/client/types/user_profile_photos.py index 56156061..c99e5d43 100644 --- a/pyrogram/client/types/user_profile_photos.py +++ b/pyrogram/client/types/user_profile_photos.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class UserProfilePhotos(Object): - ID = 0xb0700014 - """This object represent a user's profile pictures. Attributes: @@ -33,9 +31,10 @@ class UserProfilePhotos(Object): photos (List of List of :obj:`PhotoSize `): Requested profile pictures (in up to 4 sizes each). - """ + ID = 0xb0700014 + def __init__(self, total_count: int, photos: list): self.total_count = total_count # int self.photos = photos # Vector> diff --git a/pyrogram/client/types/venue.py b/pyrogram/client/types/venue.py index 5d945e27..49b46cd7 100644 --- a/pyrogram/client/types/venue.py +++ b/pyrogram/client/types/venue.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class Venue(Object): - ID = 0xb0700013 - """This object represents a venue. Attributes: @@ -42,6 +40,8 @@ class Venue(Object): """ + ID = 0xb0700013 + def __init__(self, location, title: str, address: str, foursquare_id: str = None): self.location = location # Location self.title = title # string diff --git a/pyrogram/client/types/video.py b/pyrogram/client/types/video.py index 8df42ad6..e8bb2968 100644 --- a/pyrogram/client/types/video.py +++ b/pyrogram/client/types/video.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class Video(Object): - ID = 0xb0700008 - """This object represents a video file. Attributes: @@ -56,6 +54,8 @@ class Video(Object): Date the video was sent in Unix time. """ + ID = 0xb0700008 + def __init__( self, file_id: str, diff --git a/pyrogram/client/types/video_note.py b/pyrogram/client/types/video_note.py index 6fc38e69..cfbfdc79 100644 --- a/pyrogram/client/types/video_note.py +++ b/pyrogram/client/types/video_note.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class VideoNote(Object): - ID = 0xb0700010 - """This object represents a video message (available in Telegram apps as of v.4.0). Attributes: @@ -56,6 +54,8 @@ class VideoNote(Object): Date the video note was sent in Unix time. """ + ID = 0xb0700010 + def __init__( self, file_id: str, diff --git a/pyrogram/client/types/voice.py b/pyrogram/client/types/voice.py index 28e4c344..b55ad536 100644 --- a/pyrogram/client/types/voice.py +++ b/pyrogram/client/types/voice.py @@ -20,8 +20,6 @@ from pyrogram.api.core import Object class Voice(Object): - ID = 0xb0700009 - """This object represents a voice note. Attributes: @@ -50,6 +48,8 @@ class Voice(Object): Date the voice was sent in Unix time. """ + ID = 0xb0700009 + def __init__( self, file_id: str,