* Make most objects comparable
* ID attrs for PollAnswer
* fix test_game
* fix test_userprofilephotos
* update for API 4.7
* Warn on meaningless comparisons
* Update for API 4.8
* Address review
* Get started on docs, update Message._id_attrs
* Change PollOption & InputLocation
* Some more changes
* Even more changes
* First go on refactoring JobQueue
* Temporarily enable tests for the v13 branch
* Work on tests
* Temporarily enable tests for the v13 branch
* Increase coverage
* Remove JobQueue.tick()
* Address review
* Temporarily enable tests for the v13 branch
* Address review
* Dispatch errors
* Fix handling of job_kwargs
* Remove possibility to pass a Bot to JobQueue
* Unify kwargs handling in Bot methods
* Remove Request.get, make api_kwargs an explicit argument, move note to head of Bot class
* Fix test_official
* Update get_file methods
* Add notes on thumbs being ignored for small video files
* Fix some cross refs
* Add not to DictPersistence about it not actually writing to file
* Fix reply_to_message docs of Message
* Fix TypeError while unpickling TelegramError (and children)
* Add more extensive unit tests for errors pickling
* Move error pickling tests back to "test_error.py"
* Add test making sure that new errors are covered by tests
* Make meta test independent of sorting
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
* Fix start_webhook NotImplementedError on windows with python3.8
* Fine-tune and add tests.
* Minor fixes
* typos
* Make Codacy happy
Co-authored-by: n5y <41209360+n5y@users.noreply.github.com>
* Minor doc updates, following official API docs
* Fix spelling in Defaults docstrings
* Clarify Changelog of v12.7 about aware dates
* Fix typo in CHANGES.rst (#2024)
* Fix PicklePersistence.flush() with only bot_data (#2017)
* Update pylint in pre-commit to fix CI (#2018)
* Add Filters.via_bot (#2009)
* feat: via_bot filter
also fixing a small mistake in the empty parameter of the user filter and improve docs slightly
* fix: forgot to set via_bot to None
* fix: redoing subclassing to copy paste solution
* Cosmetic changes
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
* Update CHANGES.rst
Fixed Typo
Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
* Update downloads badge, add info on IRC Channel to Getting Help section
* Remove RegexHandler from ConversationHandlers Docs (#1973)
Replaced RegexHandler with MessageHandler, since the former is deprecated
* Fix Filters.via_bot docstrings
* Add notes on Markdown v1 being legacy mode
* Fixed typo in the Regex doc.. (#2036)
* Typo: Spelling
* Minor cleanup from #2043
* Document CommandHandler ignoring channel posts
* Doc fixes for a few telegram.ext classes
* Doc fixes for most `telegram` classes.
* pep-8
forgot the hard wrap is at 99 chars, not 100!
fixed a few spelling mistakes too.
* Address review and made rendering of booleans consistent
True, False, None are now rendered with ``bool`` wherever they weren't in telegram and telegram.ext classes.
* Few doc fixes for inline* classes
As usual, docs were cross-checked with official tg api docs.
* Doc fixes for telegram/files classes
As usual, docs were cross-checked with official tg api docs.
* Doc fixes for telegram.Game
Mostly just added hyperlinks. And fixed message length doc.
As usual, docs were cross-checked with official tg api docs.
* Very minor doc fix for passportfile.py and passportelementerrors.py
Didn't bother changing too much since this seems to be a custom implementation.
* Doc fixes for telegram.payments
As usual, cross-checked with official bot api docs.
* Address review 2
Few tiny other fixes too.
* Changed from ``True/False/None`` to :obj:`True/False/None` project-wide.
Few tiny other doc fixes too.
Co-authored-by: Robert Geislinger <mitachundkrach@gmail.com>
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: GauthamramRavichandran <30320759+GauthamramRavichandran@users.noreply.github.com>
Co-authored-by: Mahesh19 <maheshvagicherla99438@gmail.com>
Co-authored-by: hoppingturtles <ilovebhagwan@gmail.com>
* pollbot.py example was sending the poll to the effective_user and not effective_chat... well, it's a poll to be answered by multiple uses.
* Use User.mention_html() shortcut
Co-authored-by: Leonardo <leonardo.rezende@trt19.jus.br>
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
* feat: via_bot filter
also fixing a small mistake in the empty parameter of the user filter and improve docs slightly
* fix: forgot to set via_bot to None
* fix: redoing subclassing to copy paste solution
* Cosmetic changes
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
* added test for 'clean' argument passed to 'start_polling()'
* remove TODO
* prettify
* remove bool from func name
* improve name-ing of fake update func
* cleanup class and nameing
* replace while for for
* swap valueerror for runtimeerror
* remove all other code to reduce testing
* add comments
* don't raise error, complete cycle and assert
* remove inf loop protection
* Revert "remove all other code to reduce testing"
This reverts commit 4566a1debd.
* remove error parametrization
* remove comment
* remove pass from class
* rename update_id to offset as the original get_updates() takes argument offset (which is the update_id)
* rename test func to match original func
* fix comment
* shorten for loop
* mock get_updates() behavior when 'offset' is passed. Assert with get_updates()
* remove other functions to reduce testing
* replicate original get_updates()
* move fakeupdate class and list creation outside get_updates and store in var
* loop from 0 to make update_id consistant w array key, just easier to debug
* update comments
* Revert "remove other functions to reduce testing"
This reverts commit 1fb498a6cc.
* fix typo
* Revert "fix typo"
This reverts commit ade9fec609.
* Revert "Revert "remove other functions to reduce testing""
This reverts commit 734de1371c.
* Revert "update comments"
This reverts commit f3a032e75e.
* Revert "loop from 0 to make update_id consistant w array key, just easier to debug"
This reverts commit 0c6881d8a1.
* Revert "move fakeupdate class and list creation outside get_updates and store in var"
This reverts commit 71de999300.
* Revert "replicate original get_updates()"
This reverts commit 5d0710ac3a.
* Revert "remove other functions to reduce testing"
This reverts commit 1fb498a6cc.
* Revert "mock get_updates() behavior when 'offset' is passed. Assert with get_updates()"
This reverts commit 8c727ba1e8.
* loop from 0 to make update_id consistant w array key, for consitency
Co-authored-by: ikkemaniac <ikkemaniac@localhost>
* Remove error handlers from examples
Most examples use the same error handler, that error handler logs
update.to_dict but doesn't log error traceback. Hiding error traceback
is quite bad, removing the error handler entirely causes PTB to use
default error logging which does include error traceback.
* adding error handling example
* Change error handler example
Including:
- Change the telegram message to include usual python error message.
- HTML-escape the strings used to build the telegram message.
- Capitalize comments and add more empty lines to hopefully unify the
style with other examples, at least a bit.
- Reorder imports.
* Add an error-rising command to the error handler example
* Slightly change example error handler docstring and comments
* Make telegram message sent by the error handler example more readable
* Rename error_handler.py to errorhandlerbot.py and add a start command
* Change error handler example to work without developer chat id
* Revert "Change error handler example to work without developer chat id"
This reverts commit c4efea6f
* Make bot token a module level constant in the error handler example
Otherwise the example will require two edits 40 lines apart to run.
* Show chat id in start command of the error handler example
The example requires you to set developer chat id, this change will
make things easier for users that don't know how to see their chat id.
* Add errorhandlerbot.py to the examples folder readme
Co-authored-by: poolitzer <25934244+poolitzer@users.noreply.github.com>
Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
* Update notes on editing messages
* Update thumb and InputMedia* doc strings
* Fix attribute docstring for Updater.user_sig_handler
* Improve rendering for CCs attributes
* fix doc str for InputMedia*.media attribute
* Minor fix
* Make Filters.user attrs mutable
* Add test_filters_user_empty_args
* Add test_filters_user_empty_args
* fix locks
* Make codecov happy
* Make user_ids and usernames sets
* Correct doc string
* Address review
* Review Vol. II
* Apply suggestions from code review
Co-authored-by: Noam Meltzer <tsnoam@gmail.com>
* Review Vol III.
* propery setter is now only a wrapper to a private method + more cleanups
pylint complained on some extra stuff, so cleaned them as well
* Review Vol. IV
* Review Vol. V
* Apply changes to Filters.chat
Co-authored-by: Noam Meltzer <tsnoam@gmail.com>