eternnoir
e7b4e95fbc
Merge remote-tracking branch 'origin/master' into develop
2015-09-09 09:34:13 +08:00
pieter
99f6829ede
Fix failing test case in Py2.6 because of using {} instead of {0..9}
2015-09-08 22:34:55 +02:00
pieter
55053fe413
Fixed failing test cases because of iteritems()
2015-09-08 22:31:02 +02:00
pieter
f2971c5d6c
Merge branch 'redesign-message-handlers' into 'develop'
2015-09-08 22:22:01 +02:00
pieter
89288b166e
Implement parse_mode
2015-09-08 21:51:45 +02:00
pieter
88bd6dcbb0
Updated Logging section in README
2015-09-08 19:56:05 +02:00
pieter
710fc273d6
Better log messages
2015-09-08 19:47:55 +02:00
pieter
9f04f0ece2
Fix "module has no attribute 'logger'"
2015-09-08 18:53:36 +02:00
Pieter van den Ham
cc7ab58ed8
Fixed some typos in the README
...
Fixed a bug where TeleBot would ignore KeyboardInterrupt events
2015-09-08 17:38:44 +02:00
Pieter van den Ham
f9cbcf9b65
Redesigned message handlers
2015-09-08 10:44:31 +02:00
eternnoir
3a148c6e85
Refactor get_update method.
2015-09-05 21:54:54 +08:00
eternnoir
93aa37768a
Add readme & pep8
2015-09-05 18:12:52 +08:00
eternnoir
da729069c2
Add get_updates method.
2015-09-05 18:10:11 +08:00
eternnoir
2d5cb4fd75
Add Update class.
2015-09-05 17:58:53 +08:00
pieter
cf61577e3e
Added a string representation (__str__) for JsonDeserializable
2015-09-01 21:55:02 +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
Pieter van den Ham
6f34a22c4b
Added an incremental sleep when an error is encountered while polling
2015-08-31 02:14:14 +02:00
97Pedrito
c33c116488
Integrated blocking into polling + updated docs
2015-08-30 18:53:18 +02:00
eternnoir
4ed7be19ad
Avoid no hnadler found.
2015-08-23 22:52:20 +08:00
eternnoir
ee4061561e
Fix #61
2015-08-21 22:58:48 +08:00
97Pedrito
596df2ef2c
Extended error descriptions
...
They should provide more information about the origin of the failure.
2015-08-19 21:30:44 +02:00
eternnoir
b17831b726
Update Comment.
2015-08-19 18:27:35 +08:00
eternnoir
1517979bf2
Voice bug fix.
2015-08-19 18:25:08 +08:00
eternnoir
c3300af656
New audio,voice supported.
2015-08-19 18:08:01 +08:00
Raúl Jornet Calomarde
b25435f29a
Replaced mine_type by mime_type
2015-08-08 23:26:47 +02:00
eternnoir
821a63e3a7
Support new sendVideo API method.
2015-08-01 10:12:15 +08:00
eternnoir
b745088a05
Let thumb option in Sticker. Api chamged.
2015-08-01 09:55:17 +08:00
eternnoir
9f6a3bfb26
next_step_handler done.
2015-07-30 11:02:08 +08:00
eternnoir
a82fece950
Add method.
2015-07-30 09:23:15 +08:00
eternnoir
9219404a9a
Merge branch 'sgomez-fix-video-type' into develop
2015-07-26 20:15:57 +08:00
Sergio Gómez
83ab8a39c9
Fix video type class
2015-07-26 11:19:20 +02:00
pieter
20e3f731f7
Added split_string to apihelper.py
...
Added a warning to send_message to not exceed 5000 characters per message.
Changed send_message to use HTTP POST instead of GET, to stretch the maximum character limit a little more.
2015-07-25 21:31:58 +02:00
pieter
b484baea37
Fix doc error.
2015-07-24 13:56:47 +02:00
pieter
2647777b2b
Implemented register_for_reply. Closes #26
2015-07-24 13:52:48 +02:00
pieter
b468e8c943
Moved extract_command and is_command to apihelper.py.
2015-07-24 13:09:27 +02:00
eternnoir
0932e603fb
Fix python3 Exception message attribute not found.
2015-07-23 09:14:20 +08:00
eternnoir
ba1693dcf0
Bug fix.
2015-07-22 14:02:16 +08:00
eternnoir
99b82b6219
Add logger.
2015-07-20 09:56:17 +08:00
eternnoir
968d30e246
Merge branch 'master' into develop
2015-07-18 17:35:46 +08:00
Nathanael Farley
edddab8956
Changed __stop_polling from bool to threading.Event().
2015-07-18 10:27:16 +01:00
eternnoir
6bdc313fa6
Message add forward_from forward_date reply_to_message support.
2015-07-17 14:40:49 +08:00
eternnoir
621b191e8d
Fix python3 can not send file by string bug.
...
bug #40
2015-07-17 09:38:28 +08:00
eternnoir
185b3e007e
Polling interval support
...
issue #38
2015-07-15 11:19:29 +08:00
eternnoir
aeeb94d386
Fix api's document change.
2015-07-15 11:02:30 +08:00
eternnoir
6c8d30b063
Add process_new_message public method for webhook.
...
issue #36
2015-07-14 13:28:39 +08:00
eternnoir
c1bb900d91
send file, photo ...etc. by ID support. #35
2015-07-14 13:24:32 +08:00
eternnoir
913f01dfe8
Edit confused notice.
2015-07-13 09:07:07 +08:00
eternnoir
7144c79efe
Add none_stop flag for polling method.
2015-07-13 09:07:07 +08:00
FrankWang
f6a0037f8d
Fix thread pool high cpu usage.
2015-07-08 21:00:46 +08:00
eternnoir
a82f4d780f
Support python3 queue
2015-07-04 20:25:02 +08:00
eternnoir
da176b770c
Create ThreadPool when creat_thread flag is True.
2015-07-04 19:51:06 +08:00
eternnoir
e095a2ffe9
Message handler support create_threads flag.
2015-07-04 17:20:29 +08:00
eternnoir
3d678707ac
Add create_threads flag.
2015-07-04 17:00:42 +08:00
pieter
9b3f5f5ba0
Merge pool-impl branch
2015-07-04 02:42:41 +02:00
pieter
bc181572d9
Merge commit '666ab76' into develop
...
Merge master.
2015-07-03 19:38:03 +02:00
pieter
e061aa051a
Fixed API inconsistency (Message.fromUser -> Message.from_user)
2015-07-03 19:34:02 +02:00
pieter
666ab7609d
Fix TeleBot#extract_command where the function previously would incorrectly slice /command@botname
2015-07-03 19:28:04 +02:00
pieter
0af4051dfd
First implementation attempt
2015-07-03 19:22:26 +02:00
eternnoir
cff3f778bf
fix content_type bug.
2015-07-03 10:14:42 +08:00
eternnoir
6833a16b57
fix sendChatAction return value bug. API's result will be boolean.
2015-07-03 09:58:48 +08:00
eternnoir
8187e6b8fd
Add delete_chat_photo and group_chat_created support.
2015-07-03 09:43:26 +08:00
eternnoir
de88217c37
Support chat action in message.
2015-07-03 09:41:11 +08:00
eternnoir
c0d93a3fb9
Remove unuse import.
2015-07-03 09:30:30 +08:00
pieter
523c7d433a
Added AsyncTeleBot, an Asynchronous version of TeleBot.
...
All API calls on this class (except for getUpdates, since that is already done in a separate Thread) are piped through AsyncTask.
2015-07-03 01:52:18 +02:00
pieter
21231a3f01
PEP-8 clean-up.
2015-07-02 23:47:05 +02:00
pieter
47ce846ce1
Added TeleBot#reply_to(message, text)
...
Added examples dir and an EchoBot sample.
2015-07-02 23:38:11 +02: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
bc3e2115ac
Made Contact implement JsonDeserializable.
2015-07-02 14:12:10 +02:00
pieter
36ba21643b
Resolve merge conflicts.
2015-07-02 13:54:45 +02:00
pieter
86500fc9fa
Added some documentation.
2015-07-02 13:43:49 +02:00
eternnoir
1fdf8bd570
Message support contact.
2015-07-02 11:19:38 +08: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
be155afcd8
Deleted last unnecessaty json.dumps
2015-07-02 01:16:17 +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
949dfc0fb0
Fix unnecessary Thread creation when no new messages arrived.
2015-07-01 19:12:12 +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
FrankWang
8eda6a4f13
Revert "...actually implemented the offset in TeleBot#get_update now..."
2015-06-30 10:00:19 +08:00
pieter
37ffcdf6a6
...actually implemented the offset now...
2015-06-30 03:39:36 +02:00
pieter
c9adf52236
Extended the ReplyKeyboardMarkup class to allow easy creation of a complex ReplyKeyboardMarkup (so without the hassle of manipulating json strings directly).
2015-06-30 02:00:47 +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
8898e3b8cc
Add some comment.
2015-06-28 17:27:25 +08:00
eternnoir
8e22bbf180
Message support text, audio, document, photo, sticker, video, location.
2015-06-28 17:19:15 +08:00
eternnoir
7c1c982b3f
Add try to polling getUpdates.
2015-06-27 22:31:40 +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
cc4ff12103
Change telebot polling thread to daemon. fix #2
2015-06-27 10:03:02 +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
b14cf1ecd4
Add TODO to readme.
2015-06-26 21:56:49 +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
518fed5bc1
Add User json convert.
2015-06-26 15:15:30 +08:00
eternnoir
9c3886f332
First Init.
2015-06-26 14:55:13 +08:00