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