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.htmlormessage.text.markdowndirectly as text argument when you send a new message (the same applies tomessage.captionfor media messages).Example:
Description
Result
Styled text
bold, italic,
codemessage.textbold,italic,codemessage.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.inifile location (and its name too) by using the newconfig_fileparameter 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.
New Filters.bot to filter messages coming from bots and Filters.gif to filter GIF messages.
Enhancements#
The progress_args parameter has been added to download_media() as well.
The get_inline_bot_results() method will now raise a
TimeoutErrorin case a bot fails to answer within 10 seconds.
Breaking Changes#
The export_chat_invite_link() method will now always generate a new invite link and the
newparameter 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.