Commit graph

12 commits

Author SHA1 Message Date
Eeshan Garg 879f44ab3a bots: Move all bots and the bots API to separate package. 2017-07-18 02:20:27 -02:30
Rohitt Vashishtha c1f3544e33 bots: Allow optional config files for bots. 2017-06-21 16:43:58 -04:00
Abhijeet Kaur 400d46a532 bots: Move "EmbeddedBotHandler" class to "zerver/lib/bot_lib.py" file.
This would keep embedded classes for zulip at one place, that is, in
"zerver" directory. This also fixes break in PyPI package for bindings.
2017-06-21 16:01:16 -04:00
Abhijeet Kaur 3c41033d8c bots: Add a separate class "EmbeddedHandlerBots" in bot_lib.py.
Add another class for bot type as embedded bot, for bots that run directly
on Zulip server. This class uses internal 'internal_send_messages' from
actions.py instead of using the 'send_message' function from Zulip Client
class.

We haven't gone ahead with creating an abstract superclass right away.
We just have two versions for now, it would be easier to iterate a little
more on the interfaces, and then only add the superclass when we're ready
to lock down the interface.
2017-06-21 10:22:53 -04:00
Abhijeet Kaur b406150a56 bots: Rename BotHandlerApi class to ExternalBotHandler.
This change is done for better understanding of the class functionality
from its class name. Now there will be 3 different classes for bots,
namely 'ExternalBotHandler', 'FlaskBotHandler' and  'EmbeddedBotHandler'.
2017-06-21 10:22:53 -04:00
Tim Abbott 107bbff769 mypy: Fix likely typeshed warning with readfp. 2017-06-15 03:42:05 -07:00
Robert Hönig 6e44c1bb88 bots: Check existance of config file in get_config_info(). 2017-06-15 02:17:31 -07:00
Robert Hönig 8fba251b69 bots: Add get_config_info function for bots. 2017-06-14 20:25:07 -07:00
Robert Hönig acd71fb96e bots: Add non-obligatory initialize func for bots.
A bot that implements `initialize(client)` has initial
access to the `client` object, before `handle_message`
is called.
2017-06-14 20:25:07 -07:00
Robert Hönig fcb4cf6721 bots: Rename BotHandlerApi object client to bot_handler. 2017-06-13 11:13:23 -07:00
Aditya Bansal 60e8943ed2 pep8: Add compliance with rule E261 bot_lib.py. 2017-06-04 15:00:42 +05:30
Rohitt Vashishtha 894adb1e43 bots: Move contrib_bots to api/bots*.
This will make it convenient to include these bots in Zulip API
releases on pypi.

Fix #5009.
2017-06-01 12:31:54 -07:00
Renamed from contrib_bots/bot_lib.py (Browse further)