mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-27 08:19:47 +03:00
Update signing-in.rst
Without await for TelegramClient running code returns `RuntimeWarning: coroutine 'AuthMethods._start' was never awaited`
This commit is contained in:
parent
c47a9346e1
commit
ebc68d5d5e
|
@ -58,7 +58,7 @@ We can finally write some code to log into our account!
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
# The first parameter is the .session file name (absolute paths allowed)
|
# The first parameter is the .session file name (absolute paths allowed)
|
||||||
async with TelegramClient('anon', api_id, api_hash).start() as client:
|
async with await TelegramClient('anon', api_id, api_hash).start() as client:
|
||||||
await client.send_message('me', 'Hello, myself!')
|
await client.send_message('me', 'Hello, myself!')
|
||||||
|
|
||||||
asyncio.run(main())
|
asyncio.run(main())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user