2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 05:18:10 +00:00

Move IDs at the bottom

This commit is contained in:
Dan 2018-04-28 09:09:44 +02:00
parent e066d6740c
commit 3b314c92fb
18 changed files with 38 additions and 42 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 <pyrogram.Filters.command>`.
"""
# TODO: Document missing arguments
ID = 0xb0700003
def __init__(
self,
message_id: int,

View File

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

View File

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

View File

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

View File

@ -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 <pyrogram.PreCheckoutQuery>`, *optional*):
New incoming pre-checkout query. Contains full information about checkout.
"""
ID = 0xb0700000
def __init__(
self,
message=None,

View File

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

View File

@ -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 <pyrogram.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<Vector<PhotoSize>>

View File

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

View File

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

View File

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

View File

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