* python3.4 is no longer supported
* Prepare CHANGES.RST & README.rst for v12.0.0 release
* CHANGES.rst: small fix
* Add Bibo-Joshi to Credits
* update the changelog - in anticipation for release
* remove line about api 4.4
* fix spelling
* move too long descriptions to wiki
* Clarify InlineKeyboardButton callback-data docstring
Fixes#1267
* Improve documentation slightly
- Prettier changelog
- Link to examples on frontpage
- Link to wiki on frontpage
- Put telegram.ext in own sidebar thingy
* Improve ext.Filters documentation
Superseeds #1089
- Remove `:obj:Filter` as it's pretty obvious that it's a filter since it's in this module. It also made the html output about 1/3 times longer to scroll through.
- Add an __all__ to reorder so Filter is at the top instead of BaseFilter
- Add a proper docstring for document that documents the attributes (this is the #1089 part)
- Also fix a couple of grammar errors.
* Fix indentation in telegram.rst
* Add `git describe --long --tags` to the `python -m telegram` output
* Use admonition for examples to make them *pop* better
* Remove automodule telegram
Sphinx was whining a lot and it doesn't actually seem to be needed in any way?
* Fix Filters.document docstring per CR
Co-Authored-By: jsmnbom <jsmnbom@gmail.com>
* Fix spelling error in docs index
Co-Authored-By: jsmnbom <jsmnbom@gmail.com>
* Setting needs_sphinx to 1.7.9
so we don't have more issues with incongruent versions
* Fixed last warnings
* Make pre-commit happy
* update_filter attribute on filters
Makes it possible to have filters work on an update instead of message, while keeping behavior for current filters
* add update_type filter
* Messagehandler rework
- remove allow_edited (deprecated for a while)
- set deprecated defaults to None
- Raise deprecation warning when they're used
- add sensible defaults for filters.
- rework tests
* Commandhandler rework
* Remove deprecation test from new handler
* Some tweaks per CR
- rename update_types -> updates
- added some clarification to docstrings
* run webhook set test only on 3.6 on appveyor
* update_filter attribute on filters
Makes it possible to have filters work on an update instead of message, while keeping behavior for current filters
* add update_type filter
* Messagehandler rework
- remove allow_edited (deprecated for a while)
- set deprecated defaults to None
- Raise deprecation warning when they're used
- add sensible defaults for filters.
- rework tests
* Commandhandler rework
* Remove deprecation test from new handler
* Some tweaks per CR
- rename update_types -> updates
- added some clarification to docstrings
* run webhook set test only on 3.6 on appveyor
* Changes per CR
* Update travis to build v12
* small doc update
* try to make ci build version branches
* doc for BaseFilter
* Modify regexfilter and mergedfilter
Now returns a list of match objects for every regexfilter
* Change callbackcontext (+ docs)
* integrate in CommandHandler and PrefixHandler
* integrate in MessageHandler
* cbqhandler, iqhandler and srhandler
* make regexhandler a shell over MessageHandler
And raise deprecationWarning on creation
* clean up code and add some comments
* Rework based on internal group feedback
- use data_filter instead of regex_filter on BaseFilter
- have these filters return a dict that is then updated onto CallbackContext instead of using a list is before
- Add a .match property on CallbackContext that returns .matches[0] or None
* Fix and add test for callbackcontext.match
* Lots of documentation fixes and improvements [ci skip]
Telegram Passport (#1174):
- Add full support for telegram passport.
- New types: PassportData, PassportFile, EncryptedPassportElement, EncryptedCredentials, PassportElementError, PassportElementErrorDataField, PassportElementErrorFrontSide, PassportElementErrorReverseSide, PassportElementErrorSelfie, PassportElementErrorFile and PassportElementErrorFiles.
- New bot method: set_passport_data_errors
- New filter: Filters.passport_data
- Field passport_data field on Message
- PassportData is automagically decrypted when you specify your private key when creating Updater or Bot.
- PassportFiles is also automagically decrypted as you download/retrieve them.
- See new passportbot.py example for details on how to use, or go to our telegram passport wiki page for more info
- NOTE: Passport decryption requires new dependency `cryptography`.
Inputfile rework (#1184):
- Change how Inputfile is handled internally
- This allows support for specifying the thumbnails of photos and videos using the thumb= argument in the different send_ methods.
- Also allows Bot.send_media_group to actually finally send more than one media.
- Add thumb to Audio, Video and Videonote
- Add Bot.edit_message_media together with InputMediaAnimation, InputMediaAudio, and inputMediaDocument.
Other Bot API 4.0 changes:
- Add forusquare_type to Venue, InlineQueryResultVenue, InputVenueMessageContent, and Bot.send_venue. (#1170)
- Add vCard support by adding vcard field to Contact, InlineQueryResultContact, InputContactMessageContent, and Bot.send_contact. (#1166)
- Support new message entities: CASHTAG and PHONE_NUMBER. (#1179)
- Cashtag seems to be things like $USD and $GBP, but it seems telegram doesn't currently send them to bots.
- Phone number also seems to have limited support for now
- Add Bot.send_animation, add width, height, and duration to Animation, and add Filters.animation. (#1172)
Co-authored-by: Jasmin Bom <jsmnbom@gmail.com>
Co-authored-by: code1mountain <32801117+code1mountain@users.noreply.github.com>
Co-authored-by: Eldinnie <pieter.schutz+github@gmail.com>
Co-authored-by: mathefreak1 <mathefreak@hi2.in>
See https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition-guide-to-Version-11.0 under Context based callbacks and Filters in handlers for a good guide on the changes in this commit.
* Change handlers so context is supported
* Attempt to make parameter "guessing" work on py < 3.5
* Document use_context in all handlers
* Add Context to docs
* Minor fixes to context handling
* Add tests for context stuff
* Allow the signature check to work on py<3.5 with methods
* Fix order of operations
* Address most issues raised in CR
* Make CommandHandler no longer support filter lists
* Fix indent
(pycharm can be an arse sometimes)
* Improve readability in conversationhandler
* Make context have Match instead of groups & groupdict
* Remove filter list support from messagehandler too
* Small fix to StringCommandHandler
* More small fixes to handlers
* Amend CHANGES
* Fix tests and fix bugs raised by tests
* Don't allow users to ignore errors without messing with the warning filters themselves
* Ignore our own deprecation warnings when testing
* Skipping deprecationwarning test on py2
* Forgot some changes
* Handler: Improved documentation and text of deprecation warnings
* HandlerContext: Keep only dispatcher and use properties; improved doc
* Complete fixing the documentation.
- Fixes per Eldinnie's comments.
- Fixes per warnings when running sphinx.
* Some small doc fixes (interlinks and optionals)
* Change add_error_handler to use HandlerContext too
* More context based changes
Context Based Handlers -> Context Based Callbacks
No longer use_context args on every single Handler
Instead set dispatcher/updater .use_context=True to use
Works with
- Handler callbacks
- Error handler callbacks
- Job callbacks
Change examples to context based callbacks so new users are not confused
Rename and move the context object from Handlers.HandlerContext to CallbackContext, since it doesn't only apply to handlers anymore.
Fix tests by adding a new fixture `cpd` which is a dispatcher with use_context=True
* Forgot about conversationhandler
* Forgot jobqueue
* Add tests for callbackcontext & for context based callback job
* Fix as per review :)
- Added all the new and shiny features from API 3.1.
- Not API 3.1 changes:
- Use future.utils.string_types for string isinstance checks.
- Stall between retries of test_set_webhook_get_webhook_info() &
test_delete_webhook().
* Small fixes to documentation and add myself to AUTHORS.
* Rework CONTRIBUTIONS.rst
Use code-blocks instead of literals, change headings for portability and use a relative link to AUTHORS instead of linking to a specific copy.