* Bump API Version to v5.2
* InputInvoiceMessageContent & simplify *Markup.__eq__ on the fly
* Updates to send_invoice
* InlineQuery updatees and new parameter for InlineQueryhandler
* VCScheduled - not integrated into Message yet
* Bump requirements-dev.txt versions
* Message.voice_chat_scheduled & new Filters.status_update.vcs
* Some doc updates
* Review
* All praise harshil, the god of finding typos :)
* Review
* More warnings
* Pure API changes
* Address review
* set Bot.commands on successfull call of set_my_commands
* Get started on tests
* More tests!
* More Coverage!
* Reset changes in utils.request
* Filters.dice, Filters.dice.text
* more coverage
* Address review
* Address review
* Test stop_poll with reply_markup
* Test stop_poll also without reply_markup
* Rephrase note on 'dice'
* Fix grammar in note on Filters.dice
* update api version readme
* address review
* First take on 4.6 support
* improved docs
* Minor doc formattings
* added poll and poll_answer to filters
* added tests, fixed mentioned issues
* added poll_answer + poll filter tests
* Update docs according to official API docs
* introducing pollhandler and pollanswerhandler
* First take on 4.6 support
* improved docs
* Minor doc formattings
* added poll and poll_answer to filters
* added tests, fixed mentioned issues
* added poll_answer + poll filter tests
* Update docs according to official API docs
* introducing pollhandler and pollanswerhandler
* correct_option_id validated with None
when trying to send a poll with correct option id 0 it was failing. Now None check is done so that even when 0 is passed it is assigned.
* improving example
* improving code
* adding poll filter example to the pollbot.py
* Update Readme
* simplify pollbot.py and add some comments
* add tests for Poll(Answer)Handler
* We just want Filters.poll, not Filters.update.poll
* Make test_official fail again
* Handle ME.language in M._parse_*
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
Co-authored-by: Sharun Kumar <715417+sharunkumar@users.noreply.github.com>
* 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
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>
* add documentation for telegram.utils.promise and .request
* improve documentation for telegram.utils.promise and .request
* add missing 's' to new_chat_member(s) in all docstrings
* fix docs for `set_chat_photo`
[CI skip]
* add support for 3.5 api
* removed "unused" import by accident
* Hardcoded values
Appearantly TG decided to change the size of a send image (again)
* test_official
* Improve coverage
* Finishing up
* spelling error
* pytest fixed tot < than 3.3 for python 3.3 support
* flake8
* rollback requirements
* as per CR
* object for provider_data
Make it possible to send an object that will be json-serialized for send_invoice + tests
* shorten error message
* using string_types
* New fields channel_post and edited_channel_post for Update
refs #468
* setGameScore() changes
- Changed behaviour: messages with high scores will be update with new
high scores by default. (documentation fix)
- Use (new) disable_edit_message in setGameScore to disable the above new
behaviour.
- The edit_message parameter from setGameScore is no longer in use. For
backward compatibility, it will be taken into account for a while,
unless disable_edit_message is passed explicitly.
refs #468
* New field forward_from_message_id for Message.
refs #468
* New parameter cache_time for answerCallbackQuery
refs #468
* replykeyboardhide renamed to replykeyboardremove
refs #468
* Unitests for updated setGameScore semantics
refs #468
* Backward compatibility for ReplyKeyboardHide
refs #468
* Fix docstrings of wrapper methods in Message
* Unitest new field forward_from_message_id of Message
refs #468
* Fix testMaxCaptionLength
Telegram servers changed their behaviour - now they truncate a long
caption instead of returning an error.
* MessageHandler: Added support for channel posts
* Fix flake8 complaints in a manner which yapf will like it too.
* fix rst markup
* update sphinx source files to properly build latexpdf and improve html build
* fix docstrings and sphinx sources to get rid of warnings
* add telegram.contrib.rst