Pyrogram v0.17.0#

Layer 112 with plenty of additions and fixes#

New Features and Enhancements#

  • API schema updated to Layer 112.

  • Added a copy button to documentation snippets for easy copy pasting. Thanks to @ColinTheShark for this.

  • Added more Chat bound methods: get_member(), get_members(), iter_members and add_members (contributed by @rsktg in #383).

  • Added is_creator field to the Chat object.

  • A new block parameter has been added to stop(), restart() to allow calling them in a non-blocking way. Useful, with block=False, inside update handlers in order not to cause a deadlock.

  • Added a .bind() method to all Pyrogram types. Useful to re-enable bound-methods after deserialization by binding the client instance to the object.

  • Added a FAQ about why stop, restart, add/remove_handler could make the code hang if used improperly.

  • Added set_slow_mode() method.

  • Added update_profile() method (contributed by @kalmengr in #277).

  • Added support to quiz, public voting and multiple answers polls.

  • Added support for Telegram’s Dice and Dart: added Dice and send_dice().

  • Added support for extended chat permissions for a finer control.

  • When no_updates=True Pyrogram will not spawn any unnecessary thread anymore.

  • Added FAQs about file_ref values, webhooks, flood limits and sqlite3.OperationalError.

  • Added support for ttl_seconds in Photo and Video objects. Useful for secret photos.

  • Added support for chosen inline results: added ChosenInlineResult type and an handler for listening to such update, on_chosen_inline_result().

  • Added support for scheduled forward messages.

Bug Fixes#

  • Fixed an error causing delete_profile_photos() to fail.

  • Fixed group, channel and supergroup ChatPhoto downloads.

  • Fixed an issue causing Chat.restrict_member to fail.

  • Fixed plugins not being correctly reloaded from disk after a restart.

  • Fixed stop_poll (contributed by @trenoduro in #339).

  • Fixed error messages not being properly shown in case no_update=True.

  • Fixed set_administrator_title not properly setting permissions when changing a member’s title.

  • Fixed editing media not working due to missing file references.

  • Fixed object decoder breaking on re.Match objects.

  • Fixed message entities being kept unparsed for private messages.

Breaking Changes#

  • Dropped the [fast] setup directive. Now tgcrypto needs to be added as a separate dependency.