From 29fa3ec5200e2f55b464b1bd58ea622be6f90cd7 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 20 Dec 2020 17:57:41 +0100 Subject: [PATCH] Remove unneeded util functions and improve docs --- pyrogram/utils.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pyrogram/utils.py b/pyrogram/utils.py index 1969b242..43b7b5a0 100644 --- a/pyrogram/utils.py +++ b/pyrogram/utils.py @@ -33,21 +33,12 @@ from pyrogram.file_id import FileId, FileType, PHOTO_TYPES, DOCUMENT_TYPES async def ainput(prompt: str = "", *, hide: bool = False): + """Just like the built-in input, but async""" with ThreadPoolExecutor(1) as executor: func = functools.partial(getpass if hide else input, prompt) return await asyncio.get_event_loop().run_in_executor(executor, func) -def get_offset_date(dialogs): - for m in reversed(dialogs.messages): - if isinstance(m, raw.types.MessageEmpty): - continue - else: - return m.date - else: - return 0 - - def get_input_media_from_file_id( file_id: str, expected_file_type: FileType = None