* Add deepsource config
* Update Badges
* Update Badges some more
* Stupid change to trigger analysis of all files
* Try to get ignore right
* Update badges again
* Get started on fixing issues
* Fix some more issues
* Remove more plank lines
* Docs for de_json/list & to_dict/json
* Some improvements from deepcode.ai
* Some more improvements
* Some more improvements
* More docstrnigs & let's run DS on the tests just for fun
* Autofix issues in 10 files
Resolved issues in the following files via DeepSource Autofix:
1. tests/conftest.py
2. tests/test_bot.py
3. tests/test_commandhandler.py
4. tests/test_conversationhandler.py
5. tests/test_dispatcher.py
6. tests/test_filters.py
7. tests/test_inputmedia.py
8. tests/test_messagehandler.py
9. tests/test_official.py
10. tests/test_persistence.py
* Some more improvements for tests, but that shall be enough
* Some more docstrings for functions
* Some minor stuff, try to fix tests
* Update DS config
* Still more docs
* Doc fixes
* More fixes
* Fix: indent docstring
* Some fixes
* Revert "Stupid change to trigger analysis of all files"
This reverts commit dd46c260
* Review
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
* 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
* Change default handling, update signatures, get existing tests to pass.
* Try running tests on ubuntu 18.04
* Roll back
* Rework check_shortcut_call tests
* Further improve check_shortcut_call tests
* Start on defaults-checks for shortcuts, get it working for test_message
* Add check_shortcut_defaults to all other shortcut tests
* Some fine tuning
* Add defaults checking for bot methods
* Missing tests for TestCallbackQuery
* Test edit_message_media with defaults & some comments
* Fix cryptography requirement
* drop debug prints
* Remove debug prints
* Another try
* Try to fix coverage & logs
* Rearrange test order
* increase coverage
* Try to fix coverage reports
* address review
* Adapt tests like in #2386
* fix CI
* fix CI
* Render-fixes for BP
* docs: fix simple typo, submition -> submission (#2260)
There is a small typo in tests/test_bot.py.
Should read `submission` rather than `submition`.
* Type on rawapibot.py docstring
* typo
* Typo: Filters.document(s)
* Typo fix
* Doc fix for messageentity (#2311)
* Add New Shortcuts to Chat (#2291)
* Add shortcuts
* Add a note
* Add run_async Parameter to ConversationHandler (#2292)
* Add run_async parameter
* Update docstring
* Update test to explicitly specify parameter
* Fix test job queue
* Add version added tag to docs
* Update docstring
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
* Doc nitpicking
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
* Fix rendering in messageentity
Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
Co-authored-by: zeshuaro <joshuaystang@gmail.com>
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
* fix: type hints for TelegramError
changed :class:`telegram.TelegramError` to :class:`telegram.error.TelegramError`
* fix: the error can be more then just a Telegram error
* Doc fix for inlinekeyboardbutton.py
added missing colon which broke rendering
* fix: remove context argument and doc remark
look at us already being in post 12
* use rtd badge
* filters doc fixes
* fix some rendering
* Doc & Rendering fixes for helpers.py
Co-authored-by: Tim Gates <tim.gates@iress.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: zeshuaro <joshuaystang@gmail.com>
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Harshil <ilovebhagwan@gmail.com>
* First POC
* Actually get it to work
* locals-less POC
* pre-commit
* Work on Message shortcuts, update some annotations in Bot methods
* Tippity Tappity, coding stuff
* CallbackQuery
* InlineQuery & Some other stuff
* Media Classes and PassportFile
* Fix tests
* PreCheckout- & ShippingQuery
* User
* Fix tests
* Chat
* Update rawapibot
* Update annotations for answer_inline_query
* Make pre-commit more strict
* Get pylint to read setup.cfg
* Make pylint & mypy happy aka ignore all the things
* use LogRecord.getMessage() in tests
* Make noam happy
* Update both pylint & mypy while we're at it
* Bring reqs-dev and makefile up to speed
* try making pre-commit happy
* fix jobqueue tests on the fly
* 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>
* 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>
* 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>