Rearrange code

This commit is contained in:
Dan 2019-06-06 19:29:44 +02:00
parent b205c6cce0
commit da515af959
31 changed files with 65 additions and 40 deletions

View File

@ -22,8 +22,8 @@ from .gzip_packed import GzipPacked
from .list import List
from .message import Message
from .msg_container import MsgContainer
from .tl_object import TLObject
from .primitives import (
Bool, BoolTrue, BoolFalse, Bytes, Double,
Int, Long, Int128, Int256, Null, String, Vector
)
from .tl_object import TLObject

View File

@ -18,8 +18,8 @@
from io import BytesIO
from .tl_object import TLObject
from .primitives import Int, Long
from .tl_object import TLObject
class FutureSalt(TLObject):

View File

@ -19,8 +19,8 @@
from io import BytesIO
from . import FutureSalt
from .tl_object import TLObject
from .primitives import Int, Long
from .tl_object import TLObject
class FutureSalts(TLObject):

View File

@ -19,8 +19,8 @@
from gzip import compress, decompress
from io import BytesIO
from .tl_object import TLObject
from .primitives import Int, Bytes
from .tl_object import TLObject
class GzipPacked(TLObject):

View File

@ -18,8 +18,8 @@
from io import BytesIO
from .tl_object import TLObject
from .primitives import Int, Long
from .tl_object import TLObject
class Message(TLObject):

View File

@ -19,8 +19,8 @@
from io import BytesIO
from .message import Message
from .tl_object import TLObject
from .primitives import Int
from .tl_object import TLObject
class MsgContainer(TLObject):

View File

@ -19,8 +19,8 @@
from typing import Union
from pyrogram.api import functions, types
from pyrogram.errors import UnknownError
from pyrogram.client.ext import BaseClient
from pyrogram.errors import UnknownError
class GetInlineBotResults(BaseClient):

View File

@ -23,6 +23,7 @@ from .get_chat_member import GetChatMember
from .get_chat_members import GetChatMembers
from .get_chat_members_count import GetChatMembersCount
from .get_dialogs import GetDialogs
from .get_dialogs_count import GetDialogsCount
from .iter_chat_members import IterChatMembers
from .iter_dialogs import IterDialogs
from .join_chat import JoinChat
@ -38,7 +39,6 @@ from .set_chat_title import SetChatTitle
from .unban_chat_member import UnbanChatMember
from .unpin_chat_message import UnpinChatMessage
from .update_chat_username import UpdateChatUsername
from .get_dialogs_count import GetDialogsCount
class Chats(

View File

@ -19,7 +19,6 @@
from typing import Union
from pyrogram.api import functions, types
from ...ext import BaseClient

View File

@ -58,7 +58,8 @@ class InlineQueryResultAudio(Object):
"""
def __init__(self, type: str, id: str, audio_url: str, title: str, caption: str = None, parse_mode: str = None, performer: str = None, audio_duration: int = None, reply_markup=None, input_message_content=None):
def __init__(self, type: str, id: str, audio_url: str, title: str, caption: str = None, parse_mode: str = None,
performer: str = None, audio_duration: int = None, reply_markup=None, input_message_content=None):
self.type = type # string
self.id = id # string
self.audio_url = audio_url # string

View File

@ -20,10 +20,10 @@ import binascii
import struct
from pyrogram.api import types
from pyrogram.errors import FileIdInvalid
from pyrogram.client.ext import utils, BaseClient
from pyrogram.client.style import HTML, Markdown
from pyrogram.client.types.object import Object
from pyrogram.errors import FileIdInvalid
class InlineQueryResultCachedAudio(Object):

View File

@ -56,7 +56,8 @@ class InlineQueryResultCachedDocument(Object):
"""
ID = 0xb0700015
def __init__(self, type: str, id: str, title: str, document_file_id: str, description: str = None, caption: str = None, parse_mode: str = None, reply_markup=None, input_message_content=None):
def __init__(self, type: str, id: str, title: str, document_file_id: str, description: str = None,
caption: str = None, parse_mode: str = None, reply_markup=None, input_message_content=None):
self.type = type # string
self.id = id # string
self.title = title # string

View File

@ -53,7 +53,8 @@ class InlineQueryResultCachedGif(Object):
"""
ID = 0xb0700012
def __init__(self, type: str, id: str, gif_file_id: str, title: str = None, caption: str = None, parse_mode: str = None, reply_markup=None, input_message_content=None):
def __init__(self, type: str, id: str, gif_file_id: str, title: str = None, caption: str = None,
parse_mode: str = None, reply_markup=None, input_message_content=None):
self.type = type # string
self.id = id # string
self.gif_file_id = gif_file_id # string

View File

@ -53,7 +53,8 @@ class InlineQueryResultCachedMpeg4Gif(Object):
"""
ID = 0xb0700013
def __init__(self, type: str, id: str, mpeg4_file_id: str, title: str = None, caption: str = None, parse_mode: str = None, reply_markup=None, input_message_content=None):
def __init__(self, type: str, id: str, mpeg4_file_id: str, title: str = None, caption: str = None,
parse_mode: str = None, reply_markup=None, input_message_content=None):
self.type = type # string
self.id = id # string
self.mpeg4_file_id = mpeg4_file_id # string

View File

@ -56,7 +56,8 @@ class InlineQueryResultCachedPhoto(Object):
"""
ID = 0xb0700011
def __init__(self, type: str, id: str, photo_file_id: str, title: str = None, description: str = None, caption: str = None, parse_mode: str = None, reply_markup=None, input_message_content=None):
def __init__(self, type: str, id: str, photo_file_id: str, title: str = None, description: str = None,
caption: str = None, parse_mode: str = None, reply_markup=None, input_message_content=None):
self.type = type # string
self.id = id # string
self.photo_file_id = photo_file_id # string

View File

@ -56,7 +56,8 @@ class InlineQueryResultCachedVideo(Object):
"""
ID = 0xb0700016
def __init__(self, type: str, id: str, video_file_id: str, title: str, description: str = None, caption: str = None, parse_mode: str = None, reply_markup=None, input_message_content=None):
def __init__(self, type: str, id: str, video_file_id: str, title: str, description: str = None, caption: str = None,
parse_mode: str = None, reply_markup=None, input_message_content=None):
self.type = type # string
self.id = id # string
self.video_file_id = video_file_id # string

View File

@ -53,7 +53,8 @@ class InlineQueryResultCachedVoice(Object):
"""
ID = 0xb0700017
def __init__(self, type: str, id: str, voice_file_id: str, title: str, caption: str = None, parse_mode: str = None, reply_markup=None, input_message_content=None):
def __init__(self, type: str, id: str, voice_file_id: str, title: str, caption: str = None, parse_mode: str = None,
reply_markup=None, input_message_content=None):
self.type = type # string
self.id = id # string
self.voice_file_id = voice_file_id # string

View File

@ -62,7 +62,9 @@ class InlineQueryResultContact(Object):
"""
ID = 0xb0700009
def __init__(self, type: str, id: str, phone_number: str, first_name: str, last_name: str = None, vcard: str = None, reply_markup=None, input_message_content=None, thumb_url: str = None, thumb_width: int = None, thumb_height: int = None):
def __init__(self, type: str, id: str, phone_number: str, first_name: str, last_name: str = None, vcard: str = None,
reply_markup=None, input_message_content=None, thumb_url: str = None, thumb_width: int = None,
thumb_height: int = None):
self.type = type # string
self.id = id # string
self.phone_number = phone_number # string

View File

@ -68,7 +68,9 @@ class InlineQueryResultDocument(Object):
"""
ID = 0xb0700006
def __init__(self, type: str, id: str, title: str, document_url: str, mime_type: str, caption: str = None, parse_mode: str = None, description: str = None, reply_markup=None, input_message_content=None, thumb_url: str = None, thumb_width: int = None, thumb_height: int = None):
def __init__(self, type: str, id: str, title: str, document_url: str, mime_type: str, caption: str = None,
parse_mode: str = None, description: str = None, reply_markup=None, input_message_content=None,
thumb_url: str = None, thumb_width: int = None, thumb_height: int = None):
self.type = type # string
self.id = id # string
self.title = title # string

View File

@ -65,7 +65,9 @@ class InlineQueryResultGif(Object):
"""
ID = 0xb0700001
def __init__(self, type: str, id: str, gif_url: str, thumb_url: str, gif_width: int = None, gif_height: int = None, gif_duration: int = None, title: str = None, caption: str = None, parse_mode: str = None, reply_markup=None, input_message_content=None):
def __init__(self, type: str, id: str, gif_url: str, thumb_url: str, gif_width: int = None, gif_height: int = None,
gif_duration: int = None, title: str = None, caption: str = None, parse_mode: str = None,
reply_markup=None, input_message_content=None):
self.type = type # string
self.id = id # string
self.gif_url = gif_url # string

View File

@ -62,7 +62,9 @@ class InlineQueryResultLocation(Object):
"""
ID = 0xb0700007
def __init__(self, type: str, id: str, latitude: float, longitude: float, title: str, live_period: int = None, reply_markup=None, input_message_content=None, thumb_url: str = None, thumb_width: int = None, thumb_height: int = None):
def __init__(self, type: str, id: str, latitude: float, longitude: float, title: str, live_period: int = None,
reply_markup=None, input_message_content=None, thumb_url: str = None, thumb_width: int = None,
thumb_height: int = None):
self.type = type # string
self.id = id # string
self.latitude = latitude # double

View File

@ -65,7 +65,9 @@ class InlineQueryResultMpeg4Gif(Object):
"""
ID = 0xb0700002
def __init__(self, type: str, id: str, mpeg4_url: str, thumb_url: str, mpeg4_width: int = None, mpeg4_height: int = None, mpeg4_duration: int = None, title: str = None, caption: str = None, parse_mode: str = None, reply_markup=None, input_message_content=None):
def __init__(self, type: str, id: str, mpeg4_url: str, thumb_url: str, mpeg4_width: int = None,
mpeg4_height: int = None, mpeg4_duration: int = None, title: str = None, caption: str = None,
parse_mode: str = None, reply_markup=None, input_message_content=None):
self.type = type # string
self.id = id # string
self.mpeg4_url = mpeg4_url # string

View File

@ -68,7 +68,9 @@ class InlineQueryResultVenue(Object):
"""
ID = 0xb0700008
def __init__(self, type: str, id: str, latitude: float, longitude: float, title: str, address: str, foursquare_id: str = None, foursquare_type: str = None, reply_markup=None, input_message_content=None, thumb_url: str = None, thumb_width: int = None, thumb_height: int = None):
def __init__(self, type: str, id: str, latitude: float, longitude: float, title: str, address: str,
foursquare_id: str = None, foursquare_type: str = None, reply_markup=None, input_message_content=None,
thumb_url: str = None, thumb_width: int = None, thumb_height: int = None):
self.type = type # string
self.id = id # string
self.latitude = latitude # double

View File

@ -71,7 +71,9 @@ class InlineQueryResultVideo(Object):
"""
ID = 0xb0700003
def __init__(self, type: str, id: str, video_url: str, mime_type: str, thumb_url: str, title: str, caption: str = None, parse_mode: str = None, video_width: int = None, video_height: int = None, video_duration: int = None, description: str = None, reply_markup=None, input_message_content=None):
def __init__(self, type: str, id: str, video_url: str, mime_type: str, thumb_url: str, title: str,
caption: str = None, parse_mode: str = None, video_width: int = None, video_height: int = None,
video_duration: int = None, description: str = None, reply_markup=None, input_message_content=None):
self.type = type # string
self.id = id # string
self.video_url = video_url # string

View File

@ -56,7 +56,8 @@ class InlineQueryResultVoice(Object):
"""
ID = 0xb0700005
def __init__(self, type: str, id: str, voice_url: str, title: str, caption: str = None, parse_mode: str = None, voice_duration: int = None, reply_markup=None, input_message_content=None):
def __init__(self, type: str, id: str, voice_url: str, title: str, caption: str = None, parse_mode: str = None,
voice_duration: int = None, reply_markup=None, input_message_content=None):
self.type = type # string
self.id = id # string
self.voice_url = voice_url # string

View File

@ -17,6 +17,7 @@
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
from pyrogram.api.types import InputPhoneContact as RawInputPhoneContact
from pyrogram.session.internals import MsgId
from ..object import Object

View File

@ -17,6 +17,7 @@
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
from pyrogram.api.types import ReplyKeyboardForceReply
from ..object import Object

View File

@ -18,6 +18,7 @@
from pyrogram.api.types import KeyboardButton as RawKeyboardButton
from pyrogram.api.types import KeyboardButtonRequestPhone, KeyboardButtonRequestGeoLocation
from ..object import Object

View File

@ -17,6 +17,7 @@
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
from pyrogram.api.types import ReplyKeyboardHide
from ..object import Object