Pyrogram v0.7.4#

Reusable styled text messages#

New Features#

  • This new feature makes possible to reuse right away text and caption messages with entities (such as bold, italic, …). The text or caption field itself of a Message will now contain the marked up text in both HTML and Markdown syntax. Use message.text.html or message.text.markdown directly as text argument when you send a new message (the same applies to message.caption for media messages).

    Example:

    Description

    Result

    Styled text

    bold, italic, code

    message.text

    bold, italic, code

    message.text.markdown

    **bold**, __italic__, `code`

    message.text.html

    <b>bold</b>, <i>italic</i>, <code>code</code>

    Note: Markdown uses the same syntax as Telegram Desktop and other mobile apps. Note: In case there is no entity, the fields will still contain the same non-marked up text.

Additions#

  • You can now choose your config.ini file location (and its name too) by using the new config_file parameter when creating a Client. Thanks @xates for the contribution!

  • New get_chat() method to get detailed information about a chat (private, group, supergroup or channel).

  • New get_history() method to get the message history of a chat (private, group, supergroup or channel).

  • New send_gif() method to send GIF files.

  • Two new types: Messages and GIF.

  • New Filters.bot to filter messages coming from bots and Filters.gif to filter GIF messages.

Enhancements#

Breaking Changes#

  • The export_chat_invite_link() method will now always generate a new invite link and the new parameter has been removed. To get a previously generated link you can use get_chat() instead.

  • The get_inline_bot_results() method will not accept a location tuple anymore, two distinct parameters are used instead: latitude and longitude.