python-telegram-bot
15.9K subscribers
91 links
The official channel for the python-telegram-bot library | https://python-telegram-bot.org
Download Telegram
Another fix release, v4.3.2, was just published.

The timeout parameter is now respected again in all telegram.Bot methods.

Update to latest version:
$ pip install -U python-telegram-bot
The just released v4.3.3 brings back proxy support that was removed with the switch to urllib3 in the v4.3 release.
We want to keep a list of projects that are related to python-telegram-bot in some way.
If you are developing such a project, please add it to this list: https://github.com/python-telegram-bot/python-telegram-bot/wiki/Related-Projects
Another cool blog post that uses python-telegram-bot for a chat bot with Natural Language Processing! Link: http://blog.algorithmia.com/create-a-chatbot-telegram-python-summarize-text/

We will start collecting articles like this in the wiki, please add any articles you know (or have written yourself) here: https://github.com/python-telegram-bot/python-telegram-bot/wiki/Press
A new release, at last!
python-telegram-bot v5.1 is now available on PyPI

Changelog:

- Drop Python 2.6 support
- Deprecate telegram.Emoji

- Use ujson if available
- Add instance methods to Message, Chat, User, InlineQuery and CallbackQuery
- RegEx filtering for CallbackQueryHandler and InlineQueryHandler
- New MessageHandler filters: forwarded and entity
- Add Message.get_entity to correctly handle UTF-16 codepoints and MessageEntity offsets
- Fix bug in ConversationHandler when first handler ends the conversation
- Allow multiple Dispatcher instances
- Add ChatMigrated Exception
- Properly split and handle arguments in CommandHandler

First of all: Sorry for letting you wait so long between two releases. Second of all: Holy shit! What an epic changelog!
7 different contributors worked on this release, and there is some cool new stuff to explore. Check out our updated examples on GitHub!

As always, you can upgrade to the latest version with
pip install -U python-telegram-bot
Just a heads up: We are aware of the Bot API changes of today, October 3rd, and we are already working on it.
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