Pyrogram v0.13.0

Released on May 25, 2019

Welcome pyrogram.org

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:

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:

New Features

Enhancements

  • 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.

  • Added is_member attribute 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.

  • Added supports_streaming attribute to the Video type.

  • Hint about which client is loading which plugins folder when you start them.

  • Added a timeout parameter to Message.click()

  • Allowed Message.click() to be called without any argument for clicking the first button.

Bug Fixes

  • Method delete_messages() and Message.delete() will now return False in 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 replies parameter. Up to unlimited replies.

Breaking Changes

  • Method close_poll() was renamed to stop_poll().

  • Attribute forward_from_name of Message was renamed to forward_sender_name.

  • Poll ids are now strings and not integers.

  • ParseMode module was removed. It was pretty much useless, better just use “markdown” and “html” string literals.

  • ChatAction module was removed too, same reason of ParseMode.

  • Removed get_chat_preview() method, get_chat() will take care of both Chat and ChatPreview objects.