Open gmankab opened 3 months ago
i found a solution
from pyrogram import Client, idle
import asyncio
async def main():
client = Client('tg_bot')
@client.on_message()
async def on_msg(_, msg):
print(f'new msg {msg.id}')
await client.start()
await idle()
asyncio.run(main())
can you please note working code in documentation
Checklist
pip3 install -U git+https://github.com/Mayuri-Chan/pyrofork
and reproduced the issue using the latest development versionDescription
if i use
await client.start()
to start client, code can't hadle messages, but if i useclient.run()
, it works fineSteps to reproduce
see code example
Code example
this code works just fine, and prints all messages
this code expected to work same, but it doesn't handle messages and doesn't print anything
Logs
No response