Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Friendly method needed for online/offline status #513
Comments
|
I'll keep this open until a convenience method is added. For now you can use the raw method account.UpdateStatus: from pyrogram.raw import functions
...
# Go online explicitly
app.send(functions.account.UpdateStatus(offline=False))
# Go offline explicitly
app.send(functions.account.UpdateStatus(offline=True))Keep in mind that sending messages or doing public actions will automatically put you online. Receiving messages alone will not trigger the online status. |
|
@delivrance Thank you so much for the solution to solve my problem facing now. |
Checklist
Description
I believe currently do not have a function to set myself as online or offline when doing the task by using Pyrogram.
It is quite useful and detailed function if I am able to control the status when using Pyrogram. Thank you for your consideration.