2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 13:27:47 +00:00

Add get_history signature to BaseClient

Also make other method parameters generic
This commit is contained in:
Dan 2019-01-04 14:37:26 +01:00
parent fe4e8c5a42
commit fe89974523

View File

@ -23,8 +23,6 @@ from threading import Lock
from pyrogram import __version__ from pyrogram import __version__
from ..style import Markdown, HTML from ..style import Markdown, HTML
from ...api.core import Object
from ...session import Session
from ...session.internals import MsgId from ...session.internals import MsgId
@ -99,33 +97,23 @@ class BaseClient:
self.disconnect_handler = None self.disconnect_handler = None
def send(self, data: Object, retries: int = Session.MAX_RETRIES, timeout: float = Session.WAIT_TIMEOUT): def send(self, *args, **kwargs):
pass pass
def resolve_peer(self, peer_id: int or str): def resolve_peer(self, *args, **kwargs):
pass pass
def fetch_peers(self, entities): def fetch_peers(self, *args, **kwargs):
pass pass
def add_handler(self, handler, group: int = 0) -> tuple: def add_handler(self, *args, **kwargs):
pass pass
def save_file( def save_file(self, *args, **kwargs):
self,
path: str,
file_id: int = None,
file_part: int = 0,
progress: callable = None,
progress_args: tuple = ()
):
pass pass
def get_messages( def get_messages(self, *args, **kwargs):
self, pass
chat_id: int or str,
message_ids: int or list = None, def get_history(self, *args, **kwargs):
reply_to_message_ids: int or list = None,
replies: int = 1
):
pass pass