Released on May 25, 2019
This version features a massive overhaul of the documentation structure and a shiny new domain name: https://pyrogram.org. After well over a week spent working solely on the documentation website, here’s what’s new:
The documentation now lives at https://docs.pyrogram.org.
New style touches to make the overall website design more pleasant to look at.
New documentation sections: Introduction, Getting Started, API Reference, Topic Guides and Meta.
A Quickstart page to get new Pyrogrammers start as fast as possible.
Lots of other additions and enhancements throughout existing pages to make them more detailed.
That’s all about the documentation, for now. I hope you enjoy it! Let’s now go ahead with listing the new features this version brings in the library itself:
Added get_history_count() method.
Added get_dialogs_count() method.
Added get_contacts_count() method.
Added get_user_profile_photos_count() method.
botchat type. We now have “private”, “bot”, “group”, “supergroup” and “channel” Chat types.
get_chat() method is now able to fetch the pinned message in your own chat (saved messages).
Increased media thumbnail size from 90px to 320px side length.
is_memberattribute to the ChatMember type to check wether a restricted user is still a member of a chat.
Added back the automatic mime type detection for new uploads.
Sending and receiving
callback_data(with inline buttons and callback query respectively) has gained back support for strings. If you pass strings for which you are 100% sure they will be valid UTF-8 texts, you can rely on the library reporting back string types, otherwise you’ll get a bytes type. This is due to how Telegram handles callback queries data (only bytes allowed) and it’s a matter of convenience to allow strings as well.
supports_streamingattribute to the Video type.
Hint about which client is loading which plugins folder when you start them.
timeoutparameter to Message.click()
Allowed Message.click() to be called without any argument for clicking the first button.
Method delete_messages() and Message.delete() will now return
Falsein case they fail to delete (they used to always return True due to how Telegram handles this method; the server doesn’t raise any error).
get_messages() is now able to get more than one reply using the
repliesparameter. Up to unlimited replies.
close_poll()was renamed to stop_poll().
forward_from_nameof Message was renamed to
Poll ids are now strings and not integers.
ParseModemodule was removed. It was pretty much useless, better just use “markdown” and “html” string literals.
ChatActionmodule was removed too, same reason of