We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1dc4df8 commit 29fa3ecCopy full SHA for 29fa3ec
pyrogram/utils.py
@@ -33,21 +33,12 @@
33
34
35
async def ainput(prompt: str = "", *, hide: bool = False):
36
+ """Just like the built-in input, but async"""
37
with ThreadPoolExecutor(1) as executor:
38
func = functools.partial(getpass if hide else input, prompt)
39
return await asyncio.get_event_loop().run_in_executor(executor, func)
40
41
-def get_offset_date(dialogs):
42
- for m in reversed(dialogs.messages):
43
- if isinstance(m, raw.types.MessageEmpty):
44
- continue
45
- else:
46
- return m.date
47
48
- return 0
49
-
50
51
def get_input_media_from_file_id(
52
file_id: str,
53
expected_file_type: FileType = None
0 commit comments