1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00
Commit Graph

96 Commits

Author SHA1 Message Date
SwissCorePy
0bfefdf15d changed allowed_updates in util to update_types
i think its more clear name
2021-06-23 19:57:44 +02:00
SwissCorePy
65cf841015 Update util.py
added `allowed_updates` list (used by `_init_._retrieve_all_updates` because `chat_member` is not requested by default)
2021-06-23 16:09:40 +02:00
SwissCorePy
7118613ef7 Added missing features
* added some missing features of TelegramBotAPI 4.6-5.2 to pyTelegramBotAPI
* added type hints to (almost) all public TeleBot functions
2021-06-21 17:39:13 +02:00
SwissCorePy
795f7fff7f Some small changes
* Fixed type warnings in some editors by changing `var: Type = None` to `var: Union[Type, None] = None`
* changed some args from `obj['arg']` to `obj.get('arg')` if arg is optional
* better PEP-8 compliance for less weak warnings
* added tests for the new type `ChatInviteLink`
2021-06-19 17:59:55 +02:00
SwissCorePy
63fe6e01d1 Fixed the errors from my last PRs
I testet all using pytest and python versions 3.6-3.9 on macOS
2021-06-18 22:35:49 +02:00
SwissCorePy
bbafdd1c1d Some Updates
> Added lot of type hints to types.py
> Added some new fields from TelegramBotAPI to pyTelegramBotAPI
> fixed `circular import error in util.py
> Added functions `log_out` and `close` to __init__.py and apihelper.py
> And some more small changes
2021-06-17 20:28:53 +02:00
Badiboy
74c4ab2f04
Merge pull request #1183 from SwissCorePy/master
Fixed a bug in `user_link`
2021-06-09 17:28:13 +03:00
SwissCorePy
ab05cb0045 Fixed a bug in user_link
`user_link` returned an empty string if `include_id` was set to False
2021-06-09 16:20:42 +02:00
Badiboy
afbc67795a Partial rollback for previous update 2021-06-04 12:11:37 +03:00
SwissCorePy
ed5e5e5077 Update util.py
- Removed function `unix_time`
- Added function `escape`
- Added function `user_link`
- Added function `quick_markup`
- Added some type hints
2021-06-03 19:51:33 +02:00
SwissCorePy
9a6ddce8df Added the function unix_time 2021-06-03 19:06:53 +02:00
SwissCorePy
20030f47af Update util.py
Added the function `smart_split` to split text into meaningful parts.
2021-06-03 18:51:32 +02:00
Badiboy
82838e1d26 Infinity polling fall down fixed 2021-01-14 03:44:37 +03:00
Badiboy
c4e624d999 Avoid dead threads in treaded polling 2020-12-24 23:55:12 +03:00
Badiboy
a548374a4d long_polling_timeout update 2 2020-11-07 14:43:17 +03:00
Badiboy
7a3fd30f6a Long polling updates and combo content types 2020-11-07 12:52:51 +03:00
Artem Frantsiian
81100f249c
Fix an error with the is_pil_image function
When I've tried to send_photo as shown in detailed_example, I got an error: "AttributeError: module 'PIL' has no attribute 'Image'". 
This error was described well here: https://stackoverflow.com/a/11911536/9092263. So in accordance to prescriptions, I've made changes and It works fine for me.

Steps to reproduce:
1. initiate bot via TeleBot constructor
2. call function bot.send_photo(call.message.chat.id, open("some_image.jpg", "rb"))

P.S.
Error Environment: 
- python==3.8.5
- pyTelegramBotAPI==3.7.3
- PIL==7.2.0
2020-08-29 21:57:41 +03:00
Badiboy
cdd48c7aed Empty list optimization, Py2 arteacts removed,
Empty list optimization: None instead of [].

Py2 arteacts removed: no more six moudle used.
2020-08-24 16:02:35 +03:00
Badiboy
18eb8eb605 Two None checks 2020-08-19 23:57:48 +03:00
mrpes
317a490cf0
Type checking moved to utils 2020-08-01 01:30:38 +05:00
mrpes
0ab908705b
Support for PIL images as photo argument
Added autoconversion of PIL image to file-like object. PIL module is optional
2020-07-31 10:39:04 +05:00
daveusa31
0f387db8d2 Fix tabs 2020-07-04 20:45:48 +03:00
Badiboy
6e1cf24946 send_poll revised to standart signature 2020-05-02 13:09:52 +03:00
Badiboy
ef81868ebc Fix Deprecation warning due to invalid escape sequences 2020-05-01 11:25:51 +03:00
Ramzan Bekbulatov
8636b282d7
Merge branch 'master' into analyzer-fixes 2018-09-07 18:07:37 +03:00
uburuntu
bab9f7bbb9 enh: reset requests.Session feature
Need for proxy changing and other reconnection stuff
2018-09-06 12:48:08 +03:00
uburuntu
99466017c5 enh: optimize imports 2018-08-17 12:54:26 +03:00
uburuntu
feec1dde56 fix: little style fixes 2018-08-17 12:49:37 +03:00
users
c8b2b14157 rename async -> async_dec 2018-07-02 18:13:11 +03:00
eternnoir
48e6757686 Fix import logger problem. 2018-03-10 14:41:34 +08:00
heyyyoyy
2637e29dbe Updated sendMediaGroup method 2018-01-15 16:08:50 +03:00
the31k
1a80fc5a0e Per-thread singletons 2017-07-19 01:50:04 +03:00
Yolley
242456d92b Update util.py 2017-06-20 15:45:18 +03:00
Yolley
328cabead6 Update util.py 2017-06-20 15:45:01 +03:00
Rafael Medina
94d1b3f7a8 Added missing import for extract_arguments() 2016-04-26 11:16:49 +02:00
DrBomb
17184697ea Update util.py
Another typo
2016-03-17 22:17:06 -04:30
DrBomb
78d86752fb Update util.py
Typo
2016-03-17 00:51:02 -04:30
DrBomb
7669781737 Update util.py
Added a regexp method that returns all the text after the command.
2016-03-17 00:48:08 -04:30
eternnoir
bf9939d40e Fix queue default value. #86 2015-10-13 13:05:38 +08:00
pieter
117c5a1141 Minor CPU optimization 2015-10-03 12:48:56 +02:00
eternnoir
e7e681928d Fix polling stuch problem. 2015-10-02 23:24:54 +08:00
eternnoir
855ff40070 Fix python3 raise exception error. 2015-10-02 17:08:05 +08:00
pieter
29a42a398b Restored the non-threaded variant 2015-10-02 00:00:54 +02:00
pieter
d14e9051d4 Better error handling.
Errors now are re-raised in the Thread polling() was called from.
If none_stop is *not* set, ApiExceptions will cause the calling Thread to halt.
2015-10-01 22:03:54 +02:00
Pieter van den Ham
60ca1751ca WorkerThreads now log ApiExceptions 2015-10-01 11:33:23 +02:00
pieter
3c8faa155f Created util.py to clean up __init__.py and apihelper.py and updated README accordingly
Fixed failing send_document_by_id and send_photo_by_id
2015-08-31 11:49:03 +02:00