mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-24 15:59:18 +00:00
Move object ids ot the top
This commit is contained in:
parent
9173c49938
commit
fefcb81dde
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class Audio(Object):
|
class Audio(Object):
|
||||||
|
ID = 0xb0700006
|
||||||
|
|
||||||
"""This object represents an audio file to be treated as music by the Telegram clients.
|
"""This object represents an audio file to be treated as music by the Telegram clients.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -53,7 +55,6 @@ class Audio(Object):
|
|||||||
title (``str``, *optional*):
|
title (``str``, *optional*):
|
||||||
Title of the audio as defined by sender or by audio tags.
|
Title of the audio as defined by sender or by audio tags.
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700006
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class Chat(Object):
|
class Chat(Object):
|
||||||
|
ID = 0xb0700002
|
||||||
|
|
||||||
"""This object represents a chat.
|
"""This object represents a chat.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -68,7 +70,6 @@ class Chat(Object):
|
|||||||
True, if the bot can change the group sticker set. Returned only in getChat.
|
True, if the bot can change the group sticker set. Returned only in getChat.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700002
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class ChatMember(Object):
|
class ChatMember(Object):
|
||||||
|
ID = 0xb0700016
|
||||||
|
|
||||||
"""This object contains information about one member of a chat.
|
"""This object contains information about one member of a chat.
|
||||||
|
|
||||||
Attributes:
|
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.
|
Restricted only. True, if user may add web page previews to his messages, implies can_send_media_messages.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700016
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class ChatPhoto(Object):
|
class ChatPhoto(Object):
|
||||||
|
ID = 0xb0700015
|
||||||
|
|
||||||
"""This object represents a chat photo.
|
"""This object represents a chat photo.
|
||||||
|
|
||||||
Attributes:
|
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.
|
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):
|
def __init__(self, small_file_id: str, big_file_id: str):
|
||||||
self.small_file_id = small_file_id # string
|
self.small_file_id = small_file_id # string
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class Contact(Object):
|
class Contact(Object):
|
||||||
|
ID = 0xb0700011
|
||||||
|
|
||||||
"""This object represents a phone contact.
|
"""This object represents a phone contact.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -38,7 +40,6 @@ class Contact(Object):
|
|||||||
user_id (``int``, *optional*):
|
user_id (``int``, *optional*):
|
||||||
Contact's user identifier in Telegram.
|
Contact's user identifier in Telegram.
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700011
|
|
||||||
|
|
||||||
def __init__(self, phone_number: str, first_name: str, last_name: str = None, user_id=None):
|
def __init__(self, phone_number: str, first_name: str, last_name: str = None, user_id=None):
|
||||||
self.phone_number = phone_number # string
|
self.phone_number = phone_number # string
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class Document(Object):
|
class Document(Object):
|
||||||
|
ID = 0xb0700007
|
||||||
|
|
||||||
"""This object represents a general file (as opposed to photos, voice messages and audio files).
|
"""This object represents a general file (as opposed to photos, voice messages and audio files).
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -44,7 +46,6 @@ class Document(Object):
|
|||||||
date (``int``, *optional*):
|
date (``int``, *optional*):
|
||||||
Date the document was sent in Unix time.
|
Date the document was sent in Unix time.
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700007
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class Location(Object):
|
class Location(Object):
|
||||||
|
ID = 0xb0700012
|
||||||
|
|
||||||
"""This object represents a point on the map.
|
"""This object represents a point on the map.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -32,7 +34,6 @@ class Location(Object):
|
|||||||
latitude (``float``):
|
latitude (``float``):
|
||||||
Latitude as defined by sender.
|
Latitude as defined by sender.
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700012
|
|
||||||
|
|
||||||
def __init__(self, longitude: float, latitude: float):
|
def __init__(self, longitude: float, latitude: float):
|
||||||
self.longitude = longitude # double
|
self.longitude = longitude # double
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class Message(Object):
|
class Message(Object):
|
||||||
|
ID = 0xb0700003
|
||||||
|
|
||||||
"""This object represents a message.
|
"""This object represents a message.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -184,7 +186,6 @@ class Message(Object):
|
|||||||
E.g.: "/start 1 2 3" would produce ["start", "1", "2", "3"].
|
E.g.: "/start 1 2 3" would produce ["start", "1", "2", "3"].
|
||||||
Only applicable when using :obj:`Filters.command <pyrogram.Filters.command>`.
|
Only applicable when using :obj:`Filters.command <pyrogram.Filters.command>`.
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700003
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class MessageEntity(Object):
|
class MessageEntity(Object):
|
||||||
|
ID = 0xb0700004
|
||||||
|
|
||||||
"""This object represents one special entity in a text message.
|
"""This object represents one special entity in a text message.
|
||||||
For example, hashtags, usernames, URLs, etc.
|
For example, hashtags, usernames, URLs, etc.
|
||||||
|
|
||||||
@ -46,7 +48,6 @@ class MessageEntity(Object):
|
|||||||
For "text_mention" only, the mentioned user.
|
For "text_mention" only, the mentioned user.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700004
|
|
||||||
|
|
||||||
def __init__(self, type: str, offset: int, length: int, url: str = None, user=None):
|
def __init__(self, type: str, offset: int, length: int, url: str = None, user=None):
|
||||||
self.type = type # string
|
self.type = type # string
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class PhotoSize(Object):
|
class PhotoSize(Object):
|
||||||
|
ID = 0xb0700005
|
||||||
|
|
||||||
"""This object represents one size of a photo or a file / sticker thumbnail.
|
"""This object represents one size of a photo or a file / sticker thumbnail.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -41,7 +43,6 @@ class PhotoSize(Object):
|
|||||||
date (``int``, *optional*):
|
date (``int``, *optional*):
|
||||||
Date the photo was sent in Unix time
|
Date the photo was sent in Unix time
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700005
|
|
||||||
|
|
||||||
def __init__(self, file_id, width, height, file_size=None, date=None):
|
def __init__(self, file_id, width, height, file_size=None, date=None):
|
||||||
self.file_id = file_id # string
|
self.file_id = file_id # string
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class Sticker(Object):
|
class Sticker(Object):
|
||||||
|
ID = 0xb0700017
|
||||||
|
|
||||||
"""This object represents a sticker.
|
"""This object represents a sticker.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -59,7 +61,6 @@ class Sticker(Object):
|
|||||||
mask_position (:obj:`MaskPosition <pyrogram.MaskPosition>`, *optional*):
|
mask_position (:obj:`MaskPosition <pyrogram.MaskPosition>`, *optional*):
|
||||||
For mask stickers, the position where the mask should be placed.
|
For mask stickers, the position where the mask should be placed.
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700017
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class Update(Object):
|
class Update(Object):
|
||||||
|
ID = 0xb0700000
|
||||||
|
|
||||||
"""This object represents an incoming update.
|
"""This object represents an incoming update.
|
||||||
At most one of the optional parameters can be present in any given 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.
|
New incoming pre-checkout query. Contains full information about checkout.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700000
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class User(Object):
|
class User(Object):
|
||||||
|
ID = 0xb0700001
|
||||||
|
|
||||||
"""This object represents a Telegram user or bot.
|
"""This object represents a Telegram user or bot.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -50,7 +52,6 @@ class User(Object):
|
|||||||
photo (:obj:`ChatPhoto <pyrogram.ChatPhoto>`, *optional*):
|
photo (:obj:`ChatPhoto <pyrogram.ChatPhoto>`, *optional*):
|
||||||
User's or bot's current profile photo.
|
User's or bot's current profile photo.
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700001
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class UserProfilePhotos(Object):
|
class UserProfilePhotos(Object):
|
||||||
|
ID = 0xb0700014
|
||||||
|
|
||||||
"""This object represent a user's profile pictures.
|
"""This object represent a user's profile pictures.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -33,7 +35,6 @@ class UserProfilePhotos(Object):
|
|||||||
Requested profile pictures (in up to 4 sizes each).
|
Requested profile pictures (in up to 4 sizes each).
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700014
|
|
||||||
|
|
||||||
def __init__(self, total_count: int, photos: list):
|
def __init__(self, total_count: int, photos: list):
|
||||||
self.total_count = total_count # int
|
self.total_count = total_count # int
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class Venue(Object):
|
class Venue(Object):
|
||||||
|
ID = 0xb0700013
|
||||||
|
|
||||||
"""This object represents a venue.
|
"""This object represents a venue.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -39,7 +41,6 @@ class Venue(Object):
|
|||||||
Foursquare identifier of the venue.
|
Foursquare identifier of the venue.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700013
|
|
||||||
|
|
||||||
def __init__(self, location, title: str, address: str, foursquare_id: str = None):
|
def __init__(self, location, title: str, address: str, foursquare_id: str = None):
|
||||||
self.location = location # Location
|
self.location = location # Location
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class Video(Object):
|
class Video(Object):
|
||||||
|
ID = 0xb0700008
|
||||||
|
|
||||||
"""This object represents a video file.
|
"""This object represents a video file.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -53,7 +55,6 @@ class Video(Object):
|
|||||||
date (``int``, *optional*):
|
date (``int``, *optional*):
|
||||||
Date the video was sent in Unix time.
|
Date the video was sent in Unix time.
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700008
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class VideoNote(Object):
|
class VideoNote(Object):
|
||||||
|
ID = 0xb0700010
|
||||||
|
|
||||||
"""This object represents a video message (available in Telegram apps as of v.4.0).
|
"""This object represents a video message (available in Telegram apps as of v.4.0).
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -53,7 +55,6 @@ class VideoNote(Object):
|
|||||||
date (``int``, *optional*):
|
date (``int``, *optional*):
|
||||||
Date the video note was sent in Unix time.
|
Date the video note was sent in Unix time.
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700010
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -20,6 +20,8 @@ from pyrogram.api.core import Object
|
|||||||
|
|
||||||
|
|
||||||
class Voice(Object):
|
class Voice(Object):
|
||||||
|
ID = 0xb0700009
|
||||||
|
|
||||||
"""This object represents a voice note.
|
"""This object represents a voice note.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
@ -47,7 +49,6 @@ class Voice(Object):
|
|||||||
date (``int``, *optional*):
|
date (``int``, *optional*):
|
||||||
Date the voice was sent in Unix time.
|
Date the voice was sent in Unix time.
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700009
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
Loading…
Reference in New Issue
Block a user