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

230 Commits

Author SHA1 Message Date
pieter
b468e8c943 Moved extract_command and is_command to apihelper.py. 2015-07-24 13:09:27 +02:00
eternnoir
99b82b6219 Add logger. 2015-07-20 09:56:17 +08:00
eternnoir
621b191e8d Fix python3 can not send file by string bug.
bug #40
2015-07-17 09:38:28 +08:00
eternnoir
c1bb900d91 send file, photo ...etc. by ID support. #35 2015-07-14 13:24:32 +08:00
pieter
111ebf5c16 Extended the message_handler decorator.
TeleBot now makes use of the API's getUpdates timeout optional parameter instead of time.sleep. This yields quicker response times.
2015-07-02 22:32:18 +02:00
pieter
86500fc9fa Added some documentation. 2015-07-02 13:43:49 +02:00
pieter
13133ac5c6 Implemented command decorator. 2015-07-02 04:17:36 +02:00
pieter
b41330774b Renamed ApiError to ApiException (Subclass of Exception) 2015-07-02 01:18:23 +02:00
pieter
2f8d1ad4ed PEP 8 clean-up. 2015-07-01 22:34:40 +02:00
pieter
a03769adde Created _make_request and removed check_result in apihelper.py for efficiency and consistency improvements.
Created JsonSerializable (previously Jsonable) and JsonDeserializable.
All relevant classes now subclass JsonDeserializable to eliminate unneeded json -> string -> json conversions.
2015-07-01 22:16:13 +02:00
pieter
0068388872 Implemented #17 (with some small adjustments) and ForceReply
Changed apihelper#convert_markup
Constructed the Jsonable abstract class. All subclasses must override Jsonable#to_json.
Made ReplyKeyboardHide, ReplyKeyboardMarkup and ForceReply a subclass of Jsonable to make things less complicated in convert_markup.
2015-07-01 18:56:21 +02:00
pieter
938c98ced1 Merge branch 'develop' of https://github.com/eternnoir/pyTelegramBotAPI
Merge develop to receive the Python3 compatible version of pyTelegramBotAPI.
2015-07-01 18:29:29 +02:00
pieter
b444565b7b Implemented #17 (with some small adjustments) and ForceReply
Changed apihelper#convert_markup
Constructed the Jsonable abstract class. All subclasses must override Jsonable#to_json.
Made ReplyKeyboardHide, ReplyKeyboardMarkup and ForceReply a subclass of Jsonable to make things less complicated in convert_markup.
2015-07-01 18:29:11 +02:00
CongNT
24491f467f make telebot compatible with python3
also two small PEP8 fixes
2015-07-01 09:49:41 +07:00
pieter
759474924d Implemented getUserProfilePhotos (Though I do not see the use of it currently, because bots cannot download photos with the API) 2015-06-30 16:40:44 +02:00
eternnoir
77580e6784 Support ReplyKeyboardMarkup object. 2015-06-30 13:20:44 +08:00
pieter
af02000534 PEP 8 & IntelliJ code clean-up. 2015-06-30 05:54:04 +02:00
pieter
34da2552dd Implemented the offset parameter.
Implemented the offset parameter for the getUpdates API call according to https://core.telegram.org/bots/api#getupdates
In short: the offset is calculated by adding 1 to the id of the last received Update.
Caching messages in a list is now redundant, so the cache is removed. Only the id of the last received Update is kept for future getUpdates calls.
2015-06-30 05:49:35 +02:00
pieter
64811a3960 - Implemented an optional "offset" argument in apihelper.py.
- TeleBot#get_update now makes use of this argument, which improves the efficiency of the method.
- Removed useless req.status_code statement in apihelper.py#send_data
2015-06-30 01:44:14 +02:00
eternnoir
dd0f7ab1d5 Send chat action support. 2015-06-28 17:56:32 +08:00
eternnoir
cd0b85c03c sendLocation method supported. 2015-06-27 22:11:18 +08:00
eternnoir
343b8ebc85 Add ApiError exception. 2015-06-27 21:55:45 +08:00
eternnoir
a62139fafc Add some comment 2015-06-27 02:14:45 +08:00
eternnoir
70b63fddc1 send file methods done. 2015-06-27 01:53:07 +08:00
eternnoir
67aaed4f20 Forward message method done. 2015-06-26 22:35:52 +08:00
eternnoir
b5748b4d1f Add message cache buffer. 2015-06-26 22:16:11 +08:00
eternnoir
77948dd027 get updates and polling done. 2015-06-26 18:02:30 +08:00
eternnoir
ba2e1662cd Method getMe done. 2015-06-26 15:46:02 +08:00
eternnoir
b4691a2a3a Refactor requests para change to dict. 2015-06-26 15:19:05 +08:00
eternnoir
9c3886f332 First Init. 2015-06-26 14:55:13 +08:00