* 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>
* 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 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>
* next_t property is added to Job class
Added new property to Job class - next_t, it will show the datetime when the job will be executed next time.
The property is updated during JobQueue._put method, right after job is added to queue.
Related to #1676
* Fixed newline and trailing whitespace
* Fixed PR issues, added test
1. Added setter for next_t - now JobQueue doesn't access protected Job._next_t.
2. Fixed Job class docstring.
3. Added test for next_t property.
4. Set next_t to None for run_once jobs that already ran.
* Fixed Flake8 issues
* Added next_t setter for datetime, added test
1. next_t setter now can accept datetime type.
2. added test for setting datetime to next_t and added some asserts that check tests results.
3. Also noticed Job.days setter raises ValueError when it's more appropriate to raise TypeError.
* Fixed test_warnings, added Number type to next_t setter
1. Changed type of error raised by interval setter from ValueError to TypeError..
2. Fixed test_warning after changing type of errors in Job.days and Job.interval.
3. Added Number type to next_t setter - now it can accept int too.
* Python 2 compatibility for test_job_next_t_property
Added _UTC and _UtcOffsetTimezone for python 2 compatibility
* Fixed PR issues
1. Replaced "datetime.replace tzinfo" with "datetime.astimezone"
2. Moved testing next_t setter to separate test.
3. Changed test_job_next_t_setter so it now uses non UTC timezone.
* Defining tzinfo from run_once, run_repeating
1. Added option to define Job.tzinfo from run_once (by when.tzinfo) and run_repeating (first.tzinfo)
2. Added test to check that tzinfo is always passed correctly.
* address review
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
* Bot.py doc fixes
All docs obtained from official Bot API docs
* made flake8 happy
* address review
Also improved consistency of `returns:` in docs
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
* 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
* doc fixes
* Update AUTHORS.rst
* More doc fixes
All docs were obtained from official Bot API docs.
* Shortened line length
Did this so it passes codacy check
* Revert id docstring changes
* typo
Co-authored-by: Hinrich Mahler <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>
* Allow for nested MessageEntities in Message._parse_markdown/html, adjust tests
* remove testing relict
* Use MessageEntitys new equality check (#1465)
* Remove unused variable
* Update to custom_title feature and slow_mode_delay option
Changes:
- custom_title for ChatMember
- new method setChatAdministratorCustomTitle for Bot
- new slow_mode_delay for Chat
Update due to new API future `custom_title` from API 4.5 (https://core.telegram.org/bots/api#december-31-2019)
* Minor typo fix
* Comply with Flake8
* Add new MessageEntities and MarkdownV2
* Added file_unique_id attrs from API 4.5 and updated tests for it
* Fixed test and checked using flake8
* Fixed ChatPhoto documentation
* Fix Flake8
* Add setChatAdminCstmTitle to Bot
* Rename MDV2 methods
* Change files id attrs to unique id
* correct id_attrs for chat_photo
* Revert "temporarily skip tests failing b/c missing api 4.5 (#1738)"
This reverts commit 7cde6ca268.
* Fix text_markdown_v2 for monospace and text_links
* closing remarks from pieter
* Minor fix in escape_markdown, improve tests for it
* Fix offset bug in Message._parse_*
* Add test_chatphoto.py
* remove debug print from test_message.py
* try making codecov happy
* Update readme
* all hail codecov
* Improve Link handling for MarkdownV1 and adjust tests. Closes#1654
* Dont use beginning of pre-entity as language in _parse_markdown
* Remove debug print
* Dummy commit to try fix codecov
Co-authored-by: Hoi Dmytro <dmytro.hoi@gmail.com>
Co-authored-by: Dmytro Hoi <code@dmytrohoi.com>
Co-authored-by: poolitzer <25934244+poolitzer@users.noreply.github.com>
* Update docs according to official docs
* Add note to Updater according to #1772
* Add note on ChatPermissions
* Fix rendering for arg type of conversation_timeout
* added link property to bot
link property was available in User and Chat objects but not in Bot which was inconsistent.
* added 'link' property to Bot object
Bot will always have username so it does not require hasattr check
* add tests
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>