zeshuaro
32da6d6fce
Add Missing Shortcuts to Message ( #2330 )
...
* Add shortcuts for Message
* Fix docs in Chat
* Update docs in Message
* Fix tests in request.py
* Rollback changes made to fix mypy errors
2021-01-23 13:40:19 +01:00
Bibo-Joshi
f31787a8ef
Add pyupgrade to pre-commit Hooks ( #2301 )
...
* Add pyupgrade to pre-commit
* update test_chat
2021-01-17 23:24:20 +01:00
Stɑrry Shivɑm
b43a599e53
Rich Comparison for Bot ( #2320 )
...
* Make telegram.Bot comparable
Signed-off-by: starry69 <starry369126@outlook.com>
* Address review
Signed-off-by: starry69 <starry369126@outlook.com>
* Enhance tests & add docstring about comparison
Signed-off-by: starry69 <starry369126@outlook.com>
* Minor doc fix
* Extend tests
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2021-01-17 09:23:36 +01:00
Bibo-Joshi
7a3fd83570
Add PR Template ( #2299 )
...
* Add PR template
* Apply suggestions from code review
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
* Some more
* reformulate
* Apply suggestions from code review
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
2021-01-16 13:57:25 +01:00
Bibo-Joshi
9ada2a7cca
Drop Nightly Tests & Update Badges ( #2323 )
2021-01-16 11:27:06 +01:00
Eana Hufwe
be54cf4ece
Fix Escaping in Nested Entities in Message Properties ( #2312 )
...
* fix: overly escape and offset error markdown v2 symbols when nested
Signed-off-by: Eana Hufwe <ilove@1a23.com>
* fix: nested entity escape for HTML parsers and tests
Signed-off-by: Eana Hufwe <ilove@1a23.com>
2021-01-12 19:33:26 +01:00
zeshuaro
0c9915243d
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>
2021-01-09 20:05:58 +01:00
Bibo-Joshi
9930725e2a
Add New Shortcuts to Chat ( #2291 )
...
* Add shortcuts
* Add a note
2021-01-09 17:48:56 +01:00
Bibo-Joshi
ffd675daec
Adjust Calling of Dispatcher.update_persistence ( #2285 )
...
* Adjust calling of update_persistence
(cherry picked from commit 89c522d883
)
* Fix tests and stuff
2021-01-07 21:31:00 +01:00
Bibo-Joshi
6a831f926b
Add New Constant MAX_ANSWER_CALLBACK_QUERY_TEXT_LENGTH ( #2282 )
2021-01-07 21:27:51 +01:00
Bibo-Joshi
6903d58142
Update Copyright ( #2289 )
...
* Update coypright headers
* typos
2021-01-04 17:24:14 +01:00
Bibo-Joshi
07b6ee69d2
Update Copyright ( #2287 )
...
Signed-off-by: starry69 <starry369126@outlook.com>
2021-01-03 10:30:02 +01:00
starry69
c8a3c31dcc
Update copyright of docs config
...
Signed-off-by: starry69 <starry369126@outlook.com>
2021-01-03 14:42:51 +05:30
starry69
91e0271e4c
Update copyright headers
...
Signed-off-by: starry69 <starry369126@outlook.com>
2021-01-03 10:40:24 +05:30
Hinrich Mahler
9ddb361f76
Revert "Adjust calling of update_persistence"
...
This reverts commit 89c522d883
.
2021-01-01 21:44:23 +01:00
Hinrich Mahler
89c522d883
Adjust calling of update_persistence
2021-01-01 21:40:42 +01:00
Bibo-Joshi
2effff8254
Change Order of Class DocStrings ( #2256 )
2020-12-30 15:59:50 +01:00
Bibo-Joshi
2788191657
Add macOS to Test Matrix ( #2266 )
...
* Try testing on macos
* Skip JobQueue tests on macos
* Try stabilizing tests
* Try harder
2020-12-30 15:39:38 +01:00
Bibo-Joshi
aec6d3bada
Explicit Signatures for Shortcuts ( #2240 )
...
* 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
2020-12-30 13:41:07 +01:00
Bibo-Joshi
80b34811ab
Handle Bytes as File Input ( #2233 )
...
* Handle bytes file input
* fix tests
* Docs, Tests & Rearrangements
* Use versioning directives
* fixing type hinting of send_photo
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
2020-12-18 11:20:03 +01:00
Poolitzer
2d7a974b8f
Start Using Versioning Directives in Docs ( #2252 )
...
* adding versioning in sphinx, closing #2250
* adding version requirement to contributors doc
2020-12-17 19:05:12 +01:00
Bibo-Joshi
ef703d19e9
Doc Fixes ( #2225 )
...
* Fix dscr for soccer ball values
* Update docs of BasePersistence regarding abc
* elaborate run_daily docs
* Make docstring of send_document.filename more precise
* increase bot API and add Discussion link
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
2020-12-17 09:29:17 +01:00
Bibo-Joshi
77a8c64f6c
Improve Annotations & Docs of Handlers ( #2243 )
...
* Improve typing & docs of handlers
* Apply suggestions from code review
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
2020-12-16 17:34:57 +01:00
Bibo-Joshi
786762bb73
Allow Passing Custom Filename For All Media ( #2249 )
...
* Add filename arg to send_media methods and InputMedia*
* Tests
2020-12-16 14:28:53 +01:00
Bibo-Joshi
e0dbb99b08
Add quote kwarg to Message.reply_copy ( #2232 )
...
* add quote kwrag to Message.reply_copy
* Add docs & update tests
2020-12-03 20:51:47 +01:00
Hinrich Mahler
73b0e29a30
Bump version to v13.1
2020-11-29 17:01:03 +01:00
Bibo-Joshi
d27d1ea4d5
Correct Some Type Hints ( #2204 )
...
* Correct some reply_markup hints
* Fix type hints of effective_message_type
* fixup
2020-11-29 16:32:38 +01:00
Bibo-Joshi
ca04daf782
Doc Fixes & Extensions ( #2201 )
...
* Add note on dispatcherhandlerstop to conversationhandler
* Fine tune @run_async deprecation warning
* Refine docs of JobQueue.jobs/get_jobs_by_name
2020-11-29 16:25:47 +01:00
Bibo-Joshi
ae9ce60b55
API 5.0 ( #2181 )
...
Co-authored-by: poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2020-11-29 16:20:46 +01:00
Bibo-Joshi
1cd3a0a156
Handle Non-Binary File Input ( #2202 )
...
* Don't fail if stream is not bytes
* move logger
* Refactor InputFile.is_image
* Use f-strings
* some clean up
2020-11-24 20:31:34 +01:00
Bibo-Joshi
58b9882021
Use F-Strings Where Possible ( #2222 )
2020-11-23 22:09:29 +01:00
Bibo-Joshi
df6d5f0840
Fix bugs in replace/insert_bot ( #2218 )
...
* Fix bugs in replace/insert_bot
* Some tweaks
2020-11-22 11:08:46 +01:00
Stɑrry Shivɑm
425716f966
Add Defaults.run_async ( #2210 )
...
* Add Defaults.run_async support
Signed-off-by: starry69 <starry369126@outlook.com>
* Address some requested changes.
Signed-off-by: starry69 <starry369126@outlook.com>
* Add tests for defaults.run_async
Signed-off-by: starry69 <starry369126@outlook.com>
* Fix tests logic & add default value support for dp.add_error_handler
Signed-off-by: starry69 <starry369126@outlook.com>
* Fix tests, with requested changes
Signed-off-by: starry69 <starry369126@outlook.com>
* Add tests for error_handler
Signed-off-by: starry69 <starry369126@outlook.com>
* try to fix pre-commit
Signed-off-by: starry69 <starry369126@outlook.com>
* Enhance tests & address suggested changes
Signed-off-by: starry69 <starry369126@outlook.com>
* Improve docs
Signed-off-by: starry69 <starry369126@outlook.com>
2020-11-17 21:31:01 +01:00
Bibo-Joshi
8d9bb26cca
Improve Handling of Custom Objects in BasePersistence.insert/replace_bot ( #2151 )
...
* Handle unpickable objects
* Improve coverage
* Add user warning
* make comparison to REPLACED_BOT safe
* make pre-commit happy
* Shorten warning
2020-11-14 03:08:18 +01:00
Bibo-Joshi
d1438a9b23
Add XOR Filters and make Filters.name a Property ( #2179 )
...
* XOR Filters and make Filters.name a property
* add XORFilter to __all__
* Change example
2020-11-07 08:44:45 +01:00
Evgeny Denisov
27b03edc59
Expand Type Hints to Tuples ( #2167 )
...
Co-authored-by: Pranjalya <pranjalyawarrior@gmail.com>
2020-11-07 08:26:32 +01:00
Evgeny Denisov
ac449deb5d
Add Filters.document.file_extension ( #2169 )
...
Co-authored-by: Matheus Lemos <matheuslemosf@protonmail.com>
Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
2020-11-06 18:41:54 +01:00
Bibo-Joshi
3b9187ed5a
Rename kwargs to _kwargs where possible ( #2182 )
2020-11-05 18:12:01 +01:00
Bibo-Joshi
9831458e22
Improve and Expand CallbackQuery Shortcuts ( #2172 )
...
* CallbackQuery.delete_message()
* Improve internals of CQ shortcuts
2020-11-05 17:11:35 +01:00
Marco Fincato
a0cd6e8fef
Add Filters.caption_regex ( #2163 )
...
* Check caption in Filters.regex
Added regex matching for message caption in Filters.regex.
* Moved caption check to Filters.caption_regex
* Added caption_regex tests
The same as for regex, with only the content of the message changed, that is now inside caption.
* Fixed pre-commit tests
Lines too long and an additional blank line
* Moved line break to comply
* Reformatted code with black
* Added docstrings
2020-11-04 20:54:24 +01:00
Bibo-Joshi
8e7c0d6976
Comply with PEP561 ( #2168 )
...
* Comply with PEP561
* Try harder
* third time's (hopefully) a charme
2020-11-01 19:33:01 +01:00
Bibo-Joshi
92b9370c23
Improve Code Quality ( #2131 )
...
* 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
2020-10-31 16:33:34 +01:00
GauthamramRavichandran
237e73bfb4
Add Filters.chat_type ( #2128 )
...
* add supergroup filter
* add chat_type filter
* re-implemented ChatType
* Add deprecations, improve tests
* Fix some docs
* Fix black
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2020-10-29 19:42:08 +01:00
Bibo-Joshi
ff3fd34f08
Update Credits ( #2161 )
2020-10-27 17:43:23 +01:00
Bibo-Joshi
83791d34e7
Fix Regex in Configuration of Black Formatter ( #2159 )
2020-10-23 14:46:56 +02:00
Bibo-Joshi
02cd7b642f
Fix Configuration of Black Formatter ( #2158 )
...
* Fix Black in pre-commit
* Fix black some more
2020-10-23 13:40:02 +02:00
NikitaPirate
165a24e13d
Add Convenience Properties for Service Chats and Anonymous Admins ( #2147 )
...
Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
2020-10-18 16:15:56 +02:00
Michael K
88440079e3
Update Wheel Settings ( #2142 )
...
Wheels are only universal if they support both Python 2 and 3.
2020-10-15 21:50:25 +02:00
Bibo-Joshi
9be4c7563b
Improve Type Hinting for Class Variables ( #2136 )
2020-10-15 18:50:47 +02:00
Timur Kushukov
b554f1a85d
Update timerbot.py to v13.0 ( #2149 )
...
* Update timerbot example (#2144 )
* update timerbot example (suggestions from review)
Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
2020-10-15 18:48:12 +02:00