We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip3 install -U git+https://github.com/Mayuri-Chan/pyrofork
if i use await client.start() to start client, code can't hadle messages, but if i use client.run(), it works fine
await client.start()
client.run()
see code example
this code works just fine, and prints all messages
from pyrogram import Client client = Client('tg_bot') @client.on_message() async def on_msg(_, msg): print(f'new msg {msg.id}') client.run()
this code expected to work same, but it doesn't handle messages and doesn't print anything
from pyrogram import Client, idle import asyncio client = Client('tg_bot') @client.on_message() async def on_msg(_, msg): print(f'new msg {msg.id}') async def main(): await client.start() await idle() asyncio.run(main())
No response
The text was updated successfully, but these errors were encountered:
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
Sorry, something went wrong.
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: