Commit graph

110 commits

Author SHA1 Message Date
Jannes Höke
a37add39f4 [ci skip] update timerbot.py to use chat_data 2016-12-13 21:57:37 +01:00
Noam Meltzer
acf1541395 Botapi2.3 (#471)
* New fields channel_post and edited_channel_post for Update

refs #468

* setGameScore() changes

 - Changed behaviour: messages with high scores will be update with new
   high scores by default. (documentation fix)
 - Use (new) disable_edit_message in setGameScore to disable the above new
   behaviour.
 - The edit_message parameter from setGameScore is no longer in use. For
   backward compatibility, it will be taken into account for a while,
   unless disable_edit_message is passed explicitly.

refs #468

* New field forward_from_message_id for Message.

refs #468

* New parameter cache_time for answerCallbackQuery

refs #468

* replykeyboardhide renamed to replykeyboardremove

refs #468

* Unitests for updated setGameScore semantics

refs #468

* Backward compatibility for ReplyKeyboardHide

refs #468

* Fix docstrings of wrapper methods in Message

* Unitest new field forward_from_message_id of Message

refs #468

* Fix testMaxCaptionLength

Telegram servers changed their behaviour - now they truncate a long
caption instead of returning an error.

* MessageHandler: Added support for channel posts

* Fix flake8 complaints in a manner which yapf will like it too.

* fix rst markup
2016-12-11 22:44:52 +01:00
Blue
a7bfb0c3a1 hide inline keyboard in conversationbot example (#439) 2016-11-08 22:14:11 +01:00
Jannes Höke
b22c3cc5c0 [ci skip] add state diagrams for conversation handler examples 2016-10-28 08:26:02 +02:00
Jannes Höke
3f30f74024 update examples to use bitwise filters 2016-10-25 19:51:56 +02:00
Jannes Höke
79fc3be9cd Update README.md 2016-10-25 19:37:19 +02:00
Jannes Höke
71c73bdc74 Update README.md 2016-10-25 19:36:57 +02:00
Jannes Höke
10bdf8212c Add pass_user_data and pass_chat_data to Handler (#436)
* initial commit for user_data

* add chat_data and use defaultdict

* fix chat_data copy-paste error

* add test for user_data and chat_data

* fix case where chat is None

* remove braces from import line
2016-10-25 19:28:34 +02:00
Jannes Höke
fae1896232 Switch to readthedocs (#443)
* replace pythonhosted by readthedocs

* fix rtd links in examples/README
2016-10-19 18:00:33 +02:00
Jannes Höke
9d0e0386d9 Link echobot2 example from master 2016-09-24 16:30:39 +02:00
Jannes Höke
be675f0118 update all examples to use instance methods (#421) 2016-09-24 15:32:22 +02:00
Jannes Höke
05fb9d161a Link echobot2 example from tag v5.0 2016-09-23 17:13:06 +02:00
Jannes Höke
5116a77221 Class methods (#362)
* bot.py: add create_references method

* create bot reference in webhook handler, use create_references on new updates

* message.py: implement reply_text

* echobot2.py: use Message.reply_text

* fix create_references in webhook handler

* add some more instance methods

* Chat.kick_member and unban_member

* bot.py: Create bot references in outgoing messages

* add tests for everything testable

* test_updater.py: add create_references method to MockBot

* remove Bot.create_references and refactor TelegramObject.de_json to take the additional parameter bot

* List bot as named kwarg where used

* file.py: Use Bot.request property instead of Bot._request attr
2016-09-20 06:36:55 +02:00
eugenio412
e9c5ee7ad6 unset but (#383)
solved the bug that prevented the unset to work
2016-08-16 21:13:31 +02:00
Ilya Strukov
dd4c0f0f1d Add missing return statement in timerbot example (#368) 2016-08-07 17:59:58 +02:00
Jannes Höke
9d4691e50d Create README.md 2016-07-24 02:35:01 +02:00
Jannes Höke
f5c57cd6c6 new inlinekeyboard example (#355) 2016-07-20 00:15:03 +02:00
Jannes Höke
d5486433e5 use job context for timerbot example 2016-07-15 01:46:27 +02:00
Jannes Höke
c9ec436d68 remove old state machine example 2016-07-15 01:45:43 +02:00
Jannes Höke
ad3eec2af8 ConversationHandler (#331)
* initial commit for conversationhandler and example

* implement simple Promise for run_async/conversationhandler

* refactor Promise._done to done

* add handling for timed out Promises

* correctly handle promises with None results

* fix handling tuple states

* update comments on example

* Added a first test on the ConversationHandler.

* Fixed a small typo.

* Yapf'd.

* add sphinx doc for conversation handler

* fix title for callbackqueryhandler sphinx docs
2016-07-15 01:30:54 +02:00
Jannes Höke
738e3213a7 Merge branch 'master' into jobqueue-rework 2016-06-20 00:49:01 +02:00
Rahiel Kasim
e10fa66286 echobot: simplify handling messageless updates 2016-06-12 17:06:03 +02:00
Rahiel Kasim
deb9de0ba0 README: remove roboed, rename example 2016-06-12 16:58:18 +02:00
Rahiel Kasim
94fd6851ab more robust echobot, let roboed go 2016-06-12 15:30:56 +02:00
Jannes Höke
98be6abc11 Remove clibot.py example 2016-05-31 21:07:47 +02:00
Jannes Höke
de2d732135 Merge branch 'master' into jobqueue-rework
Conflicts:
	README.rst
	telegram/ext/commandhandler.py
	telegram/ext/messagehandler.py
2016-05-31 15:34:36 +02:00
Jannes Höke
e7f4a07b7a update timerbot example with pass_job_queue 2016-05-26 14:48:50 +02:00
Leandro Toledo
86571bc75d addHandler to add_handler 2016-05-26 01:55:51 -03:00
Jannes Höke
b3142d2974 yapf 2016-05-25 23:57:29 +02:00
Jannes Höke
3aedd78e29 make job queue API similar to the dispatcher, add new functionality 2016-05-25 23:36:41 +02:00
leandrotoledo
6bfdff8892 Update examples to column width to 99 [ci skip] 2016-05-23 17:45:01 -03:00
leandrotoledo
c7db9a96cd Set split_before_logical_operator to True 2016-05-23 17:19:35 -03:00
Rahiel Kasim
5971cb35f8 fix merge conflict snakes with master 2016-04-30 14:56:48 +02:00
Jannes Höke
6e5302c089 pass args in timerbot example #270 2016-04-30 10:19:41 +02:00
Rahiel Kasim
73c60ee817 simpler py2/py3 input in clibot example 2016-04-28 17:32:10 +02:00
Rahiel Kasim
474d5f0c9f update README and examples to new snake_case methods 2016-04-28 17:29:34 +02:00
Leandro Toledo
998040da92 Update clibot.py
Changes group=str to int
2016-04-27 22:10:31 -03:00
Noam Meltzer
3f28633e79 MessageHandler / filters: refactor
filters are now functions instead of enum like objects.
their definitions were moved to messagehandler.py
2016-04-26 17:47:37 +03:00
Jannes Höke
d383c10d4e remove check for inline_query 2016-04-22 15:36:46 +02:00
Jannes Höke
4faa4774bd Remove bot token 2016-04-22 09:11:52 +02:00
Jannes Höke
1544f612ae remove cancel command 2016-04-16 21:11:41 +02:00
Jannes Höke
53d1d5f589 fix cancel command 2016-04-16 21:09:24 +02:00
Jannes Höke
6992a7a369 fix key error 2016-04-16 21:03:30 +02:00
Jannes Höke
90576de9e2 inline keyboard example works 2016-04-16 20:55:43 +02:00
Jannes Höke
63c793aad4 initial example for inline keyboard 2016-04-16 20:32:44 +02:00
Jannes Höke
360c3077ea update examples 2016-04-16 19:25:08 +02:00
Avanatiker
0342a5b30b Update timerbot.py
The missing space bothered me.
2016-04-11 13:36:59 +03:00
kiddick@users.noreply.github.com
a264530540 Fix obsolete import for fsm bot. 2016-03-26 19:00:05 +03:00
Jannes Höke
5e7f2688be add encoding to fsm example bot 2016-03-22 02:33:43 +01:00
Jannes Höke
7199d2894f add state machine example 2016-03-21 20:08:32 +01:00