Released on Apr 14, 2019
Welcome Inline Mode, Layer 97 and many other additions¶
The API Schema has been updated to Layer 97.
The new Inline Mode makes it possible to create bots that answer to inline queries. For now, only InlineQueryResultArticle is supported, more types coming soon! https://github.com/pyrogram/assistant contains the source code of @PyrogramBot you can explore. Use the bot inline to search for Pyrogram docs directly on Telegram.
bot_tokenClient parameter to start a bot session (contributed by @bakatrouble in #221).
New send_cached_media() method to send any media stored on the Telegram servers using a file_id.
New ChatPermissions type to represent both chats’ default permissions and chat members’ permissions.
New restrict_chat() method used to edit a chat default permissions.
Lots of new (21) Message bound methods: reply_animation(), reply_audio() , reply_cached_media() , reply_chat_action() , reply_contact() , reply_document() , reply_game() , reply_inline_bot_result() , reply_location() , reply_media_group() , reply_photo() , reply_poll() , reply_sticker() , reply_venue() , reply_video() , reply_video_note() , reply_voice() , edit_caption() , edit_media() , edit_reply_markup() and pin() (contributed by @xsolinsx in #233).
__slots__in every single type to help reduce the memory footprint.
Added a retry mechanism when uploading file chunks.
Embedded an updated version of typing.py as an attempt to fix Python 3.5.0-3.5.2 issues.
send_*methods dealing with media messages (audio, document, animation, etc…) will now always send the correct Telegram media kind, regardless of the uploaded file.
Keyboard buttons’ texts are now automatically coerced to
Use a lower timeout when starting a session to speed up re-connections.
Printed object (e.g.: when using
print(message)) will now display UTF-8 characters instead of ASCII representations of their code points.
Added support for forwarded messages with hidden users; the new
forward_from_nameattribute of a Message will contain the user first name only (as string) of the author as opposed to a full User object.
Fixed a loss of thumbnails after editing media messages (contributed by @23rd in #216).
Fixed plugins not working under Windows because of broken paths (contributed by @bakatrouble in #223).
Fixed “ModuleNotFoundError is not defined” error for Python <3.6.
Fixed the get_chat_member() method not working when passing “me” in basic groups.
Fixed flood wait errors generated when iterating over basic chat members.
Fixed library not loading for Python 3.5.0-3.5.2 (contributed by @Bfaschat in #236).
Fixed set_chat_description() not working anymore after the new Layer update.