Move object ids ot the top

This commit is contained in:
Dan 2018-04-25 10:30:33 +02:00
parent 9173c49938
commit fefcb81dde
18 changed files with 36 additions and 18 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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 <pyrogram.Filters.command>`.
"""
ID = 0xb0700003
def __init__(
self,

View File

@ -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

View File

@ -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

View File

@ -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 <pyrogram.MaskPosition>`, *optional*):
For mask stickers, the position where the mask should be placed.
"""
ID = 0xb0700017
def __init__(
self,

View File

@ -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,

View File

@ -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 <pyrogram.ChatPhoto>`, *optional*):
User's or bot's current profile photo.
"""
ID = 0xb0700001
def __init__(
self,

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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,

View File

@ -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,