python-telegram-bot
15.6K subscribers
90 links
The official channel for the python-telegram-bot library | https://python-telegram-bot.org
Download Telegram
The prophecy was fullfilled! We just released v5.2

- Implement API changes of October 3rd (games update)
- Add Message.edit_* methods
- Filters for the MessageHandler can now be combined using bitwise operators (& and |)
- Add a way to save user- and chat-related data temporarily (check out the new conversationbot2.py example)
- Other bugfixes and improvements
Released v5.3

- Implement API changes of November 21st (Bot API 2.3)
- JobQueue now supports datetime.timedelta in addition to seconds
- JobQueue now supports running jobs only on certain days
- New Filters.reply filter
- Bugfix for Message.edit_reply_markup
- Other bugfixes

Update with pip install -U python-telegram-bot
I just released a hotfix version 5.3.1 which resolves https://github.com/python-telegram-bot/python-telegram-bot/issues/579 by enforcing the use of urllib3 v1.20 instead of v1.21.

We are still working on the v6 release.
Forwarded from Markdown
We just released python-telegram-bot v6.0!

This release adds lots of cool new stuff. To learn more about specific features, please read through the linked pull requests or join us in our Telegram Group and ask around.

- Add support for Bot API 2.3.1
- Add support for deleteMessage API method
- New, simpler API for JobQueue - PR #484
- Download files into file-like objects - PR #459
- Use vendor urllib3 to address issues with timeouts
- The default timeout for messages is now 5 seconds. For sending media, the default timeout is now 20 seconds.
- String attributes that are not set are now None by default, instead of empty strings
- Add text_markdown and text_html properties to Message - PR #507
- Add support for Socks5 proxy - PR #518
- Add support for filters in CommandHandler - PR #536
- Add the ability to invert (not) filters - PR #552
- Add Filters.group and Filters.private
- Compatibility with GAE via urllib3.contrib package - PR #583
- Add equality rich comparision operators to telegram objects - PR #604
- Several bugfixes and other improvements
- Remove some deprecated code

We'll be working on the new Bot API 3.0 features and bring them to you ASAP. Thanks a lot to all the wonderful people who contributed to this release!

As always, upgrade using
pip install -U python-telegram-bot
Released v6.0.1

- Add support for User.language_code
- Fix Message.text_html and Message.text_markdown for messages with emoji
We just released v6.1 beta 0, which includes all of Bot API 3.0.

You can install it using
pip install python-telegram-bot==6.1b0
We just released v6.1 beta 1, which adds the missing Handler classes for the payment API.

You can install it using
pip install python-telegram-bot==6.1b1
Released 6.1 beta 2

- Bugfixes
- Add filters for payment API

Install it using
pip install python-telegram-bot==6.1b2
Released 6.0.2

- Avoid confusion with user's urllib3 by renaming vendored urllib3 to ptb_urllib3

Upgrade using pip install python-telegram-bot -U
There seems to be a problem with the PyPI release of v6.0.2.
Please don't upgrade, we are looking into it.
If you already upgraded, you can downgrade using
pip install python-telegram-bot==6.0.1
Alright, v6.0.3 fixes the problem, you can safely upgrade now
We just released v6.1.0!

- Fully support Bot API 3.0
- Add more fine-grained filters for status updates
- Bug fixes and other improvements

As always, upgrade using
pip install python-telegram-bot -U
We just released v7.0.0!

TL;DR
- We wish to thank everyone who had contributed to this major release. If for some reason your name is not in AUTHORS.rst please don't be shy and send us a PR to add your name.

- As always, upgrade using
pip install python-telegram-bot -U




Changes:

- Fully support Bot API 3.2.
- New filters for handling messages from specific chat/user id (PR #677).
- Add the possibility to add objects as arguments to send_* methods (PR #742).
- Fixed download of URLs with UTF-8 chars in path (PR #688).
- Fixed URL parsing for Message text properties (PR #689).
- Fixed args dispatching in MessageQueue's decorator (PR #705).
- Fixed regression preventing IPv6 only hosts from connnecting to Telegram servers (Issue #720).
- ConvesationHandler - check if a user exist before using it (PR #699).
- Removed deprecated telegram.Emoji.
- Removed deprecated Botan import from utils (Botan is still available through contrib).
- Removed deprecated ReplyKeyboardHide.
- Removed deprecated edit_message argument of bot.set_game_score.
- Internal restructure of files.
- Improved documentation.
- Improved unitests.
We just released v7.0.1 (a bug fix release).

Changes:
- Fix TypeError exception in RegexHandler (PR #751).
- Small documentation fix (PR #749).

As always, upgrade using:
pip install -U python-telegram-bot
Hi,
We just wanted to let you all know that @EchteEldin & @BomJacob have been promoted to maintainers of the ptb project.
Both of them showed a major commitment & dedication to the project and have contributed a lot of their knowledge and experience. We were always happy to have them as part of the dev team, so we can only be delighted to have them as part of the maintainers.

@BomJacob & @EchteEldin - congratulations!
We just released v8.0.0!

TL;DR
- We wish to thank everyone who had contributed to this major release. If for some reason your name is not in AUTHORS.rst please don't be shy and send us a PR to add your name.

- As always, upgrade using
pip install python-telegram-bot -U

New features:

- Fully support Bot Api 3.3 (PR #806).
- DispatcherHandlerStop (see docs).
- Regression fix for text_html & text_markdown (PR #777).
- Added effective_attachment to message (PR #766).

Non backward compatible changes:

- Removed Botan support from the library (PR #776).
- Fully support Bot Api 3.3 (PR #806).
- Remove de_json() (PR #789).

Changes:

- Sane defaults for tcp socket options on linux (PR #754).
- Add RESTRICTED as constant to ChatMember (PR #761).
- Add rich comparison to CallbackQuery (PR #764).
- Fix get_game_high_scores (PR #771).
- Warn on small con_pool_size during custom initalization of Updater (PR #793).
- Catch exceptions in error handler for errors that happen during polling (PR #810).
- For testing we switched to pytest (PR #788).
- Lot's of small improvements to our tests and documentation.
We've just released v8.1.0!

TL;DR
Upgrade to get Bot API 3.4 support.

- As always, upgrade using
pip install python-telegram-bot -U


Changes:
New features
- Support Bot API 3.4 (PR #865).

Changes
- MessgaeHandler & RegexHandler now consider channel_updates.
- Fix command not recognized if it is directly followed by a newline (PR #869).
- Removed Bot._message_wrapper (PR #822).
- Unitests are now also running on Appveyor (Windows VM).
- Various unitest improvments.
- Documentation fixes.

We wish to thank everyone who had contributed to this release. Happy upgrades everyone!
We've just release v8.1.1!

TL;DR
Thanks for bringing a small error in our improve commandhandler to our attention. This is a hotfix for the risen problems with single character messages and the CommandHandler

- As always, upgrade using
pip install python-telegram-bot -U

Changes:
Fix Commandhandler crashing on single character messages (PR #873)

We wish to thank everyone who had contributed to this release. Happy upgrades everyone!
We've just released v9.0.0!

TL;DR
Upgrade to get Bot API 3.5 support.
Drop support for python v3.3

- As always, upgrade using
pip install python-telegram-bot -U

Breaking changes (possibly)
- Drop support for python 3.3 (PR #930)
Python 3.3 has reached End Of Life status.

New Features
- Support Bot API 3.5 (PR #920)
NOTE: Because a major rework of some internals for the library is needed to support the upload of new files with send_media_group this is currently not yet available. For now you can use file_id's or url's for media to send in a media group.

Changes
- Fix race condition in dispatcher start/stop (#887)
- Log error trace if there is no error handler registered (#694)
- Update examples with consistent string formatting (#870)
- Various changes and improvements to the docs.

We wish to thank everyone who had contributed to this release. Happy upgrades everyone!
We've just released v10.0.0!

TL;DR
Stability fixes
Bot API v3.6
Removed deprecated APIs

- As always, upgrade using pip install python-telegram-bot -U


Non backward compatabile changes and changed defaults

- JobQueue: Remove deprecated prevent_autostart & put() (PR #1012)
- Bot, Updater: Remove deprecated network_delay (PR #1012)
- Remove deprecated Message.new_chat_member (PR #1012)
- Retry bootstrap phase indefinitely (by default) on network errors (PR #1018)

New Features

- Support v3.6 API (PR #1006)
- User.full_name convinience property (PR #949)
- Add send_phone_number_to_provider and send_email_to_provider arguments to send_invoice (PR #986)
- Bot: Add shortcut methods reply_{markdown,html} (PR #827)
- Bot: Add shortcut method reply_media_group (PR #994)
- Added utils.helpers.effective_message_type (PR #826)
- Bot.get_file now allows passing a file in addition to file_id (PR #963)
- Add .get_file() to Audio, Document, PhotoSize, Sticker, Video, VideoNote and Voice (PR #963)
- Add .send_*() methods to User and Chat (PR #963)
- Get jobs by name (PR #1011)
- Add Message caption html/markdown methods (PR #1013)
- File.download_as_bytearray - new method to get a d/led file as bytearray (PR #1019)
- File.download(): Now returns a meaningful return value (PR #1019)
- Added conversation timeout in ConversationHandler (PR #895)

Changes

- Store bot in PreCheckoutQuery (PR #953)
- Updater: Issue INFO log upon received signal (PR #951)
- JobQueue: Thread safety fixes (PR #977)
- WebhookHandler: Fix exception thrown during error handling (PR #985)
- Explicitly check update.effective_chat in ConversationHandler.check_update (PR #959)
- Updater: Better handling of timeouts during get_updates (PR #1007)
- Remove unnecessary to_dict() (PR #834)
- CommandHandler - ignore strings in entities and "/" followed by whitespace (PR #1020)
- Documentation & style fixes (PR #942, PR #956, PR #962, PR #980, PR #983)
- Many contributors for this version, some of them for the first time, thank you all! (appologies if some1 had been forgotten):


Daniel Reed <nmlorg@gmail.com>
Eldinnie <Eldinnie@users.noreply.github.com>
Evgen <evgfilim1@yandex.ru>
graynk <gray.nk@gmail.com>
Jacob Bom <bomjacob@gmail.com>
Jannik <32801117+code1mountain@users.noreply.github.com>
Joscha Götzer <joscha.goetzer@gmail.com>
Mischa Krüger <makmanx64@gmail.com>
Noam Meltzer <tsnoam@gmail.com>
Oleg <fmorte@ya.ru>
Paul Larsen <pn1315@ic.ac.uk>
Willem <github@canihavesome.coffee>