From fefcb81dde6edc0df65c85363d5e4d7443f2430e Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 25 Apr 2018 10:30:33 +0200 Subject: [PATCH] Move object ids ot the top --- pyrogram/client/types/audio.py | 3 ++- pyrogram/client/types/chat.py | 3 ++- pyrogram/client/types/chat_member.py | 3 ++- pyrogram/client/types/chat_photo.py | 3 ++- pyrogram/client/types/contact.py | 3 ++- pyrogram/client/types/document.py | 3 ++- pyrogram/client/types/location.py | 3 ++- pyrogram/client/types/message.py | 3 ++- pyrogram/client/types/message_entity.py | 3 ++- pyrogram/client/types/photo_size.py | 3 ++- pyrogram/client/types/sticker.py | 3 ++- pyrogram/client/types/update.py | 3 ++- pyrogram/client/types/user.py | 3 ++- pyrogram/client/types/user_profile_photos.py | 3 ++- pyrogram/client/types/venue.py | 3 ++- pyrogram/client/types/video.py | 3 ++- pyrogram/client/types/video_note.py | 3 ++- pyrogram/client/types/voice.py | 3 ++- 18 files changed, 36 insertions(+), 18 deletions(-) diff --git a/pyrogram/client/types/audio.py b/pyrogram/client/types/audio.py index 9c2af385..2cf7bbfb 100644 --- a/pyrogram/client/types/audio.py +++ b/pyrogram/client/types/audio.py @@ -20,6 +20,8 @@ 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: @@ -53,7 +55,6 @@ class Audio(Object): title (``str``, *optional*): Title of the audio as defined by sender or by audio tags. """ - ID = 0xb0700006 def __init__( self, diff --git a/pyrogram/client/types/chat.py b/pyrogram/client/types/chat.py index a2894b4c..b9544a8e 100644 --- a/pyrogram/client/types/chat.py +++ b/pyrogram/client/types/chat.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class Chat(Object): + ID = 0xb0700002 + """This object represents a chat. Attributes: @@ -68,7 +70,6 @@ class Chat(Object): True, if the bot can change the group sticker set. Returned only in getChat. """ - ID = 0xb0700002 def __init__( self, diff --git a/pyrogram/client/types/chat_member.py b/pyrogram/client/types/chat_member.py index 04e675c0..f8fb91c3 100644 --- a/pyrogram/client/types/chat_member.py +++ b/pyrogram/client/types/chat_member.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class ChatMember(Object): + ID = 0xb0700016 + """This object contains information about one member of a chat. Attributes: @@ -81,7 +83,6 @@ class ChatMember(Object): Restricted only. True, if user may add web page previews to his messages, implies can_send_media_messages. """ - ID = 0xb0700016 def __init__( self, diff --git a/pyrogram/client/types/chat_photo.py b/pyrogram/client/types/chat_photo.py index 934e93fe..8a91530d 100644 --- a/pyrogram/client/types/chat_photo.py +++ b/pyrogram/client/types/chat_photo.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class ChatPhoto(Object): + ID = 0xb0700015 + """This object represents a chat photo. Attributes: @@ -33,7 +35,6 @@ class ChatPhoto(Object): 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 diff --git a/pyrogram/client/types/contact.py b/pyrogram/client/types/contact.py index 9ec4bddf..50f033f4 100644 --- a/pyrogram/client/types/contact.py +++ b/pyrogram/client/types/contact.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class Contact(Object): + ID = 0xb0700011 + """This object represents a phone contact. Attributes: @@ -38,7 +40,6 @@ class Contact(Object): user_id (``int``, *optional*): 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 diff --git a/pyrogram/client/types/document.py b/pyrogram/client/types/document.py index 6fa43020..df149187 100644 --- a/pyrogram/client/types/document.py +++ b/pyrogram/client/types/document.py @@ -20,6 +20,8 @@ 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: @@ -44,7 +46,6 @@ class Document(Object): date (``int``, *optional*): Date the document was sent in Unix time. """ - ID = 0xb0700007 def __init__( self, diff --git a/pyrogram/client/types/location.py b/pyrogram/client/types/location.py index b3a52fa1..5e4829d9 100644 --- a/pyrogram/client/types/location.py +++ b/pyrogram/client/types/location.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class Location(Object): + ID = 0xb0700012 + """This object represents a point on the map. Attributes: @@ -32,7 +34,6 @@ class Location(Object): latitude (``float``): Latitude as defined by sender. """ - ID = 0xb0700012 def __init__(self, longitude: float, latitude: float): self.longitude = longitude # double diff --git a/pyrogram/client/types/message.py b/pyrogram/client/types/message.py index 73ddf720..0e8802dc 100644 --- a/pyrogram/client/types/message.py +++ b/pyrogram/client/types/message.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class Message(Object): + ID = 0xb0700003 + """This object represents a message. Attributes: @@ -184,7 +186,6 @@ class Message(Object): E.g.: "/start 1 2 3" would produce ["start", "1", "2", "3"]. Only applicable when using :obj:`Filters.command `. """ - ID = 0xb0700003 def __init__( self, diff --git a/pyrogram/client/types/message_entity.py b/pyrogram/client/types/message_entity.py index e526373a..54d045b2 100644 --- a/pyrogram/client/types/message_entity.py +++ b/pyrogram/client/types/message_entity.py @@ -20,6 +20,8 @@ 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,7 +48,6 @@ class MessageEntity(Object): 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 diff --git a/pyrogram/client/types/photo_size.py b/pyrogram/client/types/photo_size.py index 2be6f0e2..45c36b9c 100644 --- a/pyrogram/client/types/photo_size.py +++ b/pyrogram/client/types/photo_size.py @@ -20,6 +20,8 @@ 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: @@ -41,7 +43,6 @@ class PhotoSize(Object): date (``int``, *optional*): 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 diff --git a/pyrogram/client/types/sticker.py b/pyrogram/client/types/sticker.py index 1a173e88..e6f3bff3 100644 --- a/pyrogram/client/types/sticker.py +++ b/pyrogram/client/types/sticker.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class Sticker(Object): + ID = 0xb0700017 + """This object represents a sticker. Attributes: @@ -59,7 +61,6 @@ class Sticker(Object): mask_position (:obj:`MaskPosition `, *optional*): For mask stickers, the position where the mask should be placed. """ - ID = 0xb0700017 def __init__( self, diff --git a/pyrogram/client/types/update.py b/pyrogram/client/types/update.py index 5a184874..c4b42bdd 100644 --- a/pyrogram/client/types/update.py +++ b/pyrogram/client/types/update.py @@ -20,6 +20,8 @@ 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,7 +59,6 @@ class Update(Object): New incoming pre-checkout query. Contains full information about checkout. """ - ID = 0xb0700000 def __init__( self, diff --git a/pyrogram/client/types/user.py b/pyrogram/client/types/user.py index 3dfd17a9..48a99157 100644 --- a/pyrogram/client/types/user.py +++ b/pyrogram/client/types/user.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class User(Object): + ID = 0xb0700001 + """This object represents a Telegram user or bot. Attributes: @@ -50,7 +52,6 @@ class User(Object): photo (:obj:`ChatPhoto `, *optional*): User's or bot's current profile photo. """ - ID = 0xb0700001 def __init__( self, diff --git a/pyrogram/client/types/user_profile_photos.py b/pyrogram/client/types/user_profile_photos.py index 9e4c15c8..56156061 100644 --- a/pyrogram/client/types/user_profile_photos.py +++ b/pyrogram/client/types/user_profile_photos.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class UserProfilePhotos(Object): + ID = 0xb0700014 + """This object represent a user's profile pictures. Attributes: @@ -33,7 +35,6 @@ class UserProfilePhotos(Object): 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 diff --git a/pyrogram/client/types/venue.py b/pyrogram/client/types/venue.py index 4217dd9f..5d945e27 100644 --- a/pyrogram/client/types/venue.py +++ b/pyrogram/client/types/venue.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class Venue(Object): + ID = 0xb0700013 + """This object represents a venue. Attributes: @@ -39,7 +41,6 @@ class Venue(Object): Foursquare identifier of the venue. """ - ID = 0xb0700013 def __init__(self, location, title: str, address: str, foursquare_id: str = None): self.location = location # Location diff --git a/pyrogram/client/types/video.py b/pyrogram/client/types/video.py index da9ee6a6..8df42ad6 100644 --- a/pyrogram/client/types/video.py +++ b/pyrogram/client/types/video.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class Video(Object): + ID = 0xb0700008 + """This object represents a video file. Attributes: @@ -53,7 +55,6 @@ class Video(Object): date (``int``, *optional*): Date the video was sent in Unix time. """ - ID = 0xb0700008 def __init__( self, diff --git a/pyrogram/client/types/video_note.py b/pyrogram/client/types/video_note.py index e4863b0c..6fc38e69 100644 --- a/pyrogram/client/types/video_note.py +++ b/pyrogram/client/types/video_note.py @@ -20,6 +20,8 @@ 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: @@ -53,7 +55,6 @@ class VideoNote(Object): date (``int``, *optional*): Date the video note was sent in Unix time. """ - ID = 0xb0700010 def __init__( self, diff --git a/pyrogram/client/types/voice.py b/pyrogram/client/types/voice.py index 095315d3..28e4c344 100644 --- a/pyrogram/client/types/voice.py +++ b/pyrogram/client/types/voice.py @@ -20,6 +20,8 @@ from pyrogram.api.core import Object class Voice(Object): + ID = 0xb0700009 + """This object represents a voice note. Attributes: @@ -47,7 +49,6 @@ class Voice(Object): date (``int``, *optional*): Date the voice was sent in Unix time. """ - ID = 0xb0700009 def __init__( self,