python-zulip-api/zulip_botserver
vaibhav c4876dddae bot server: Raise BadRequest when bot code can't be imported.
This adds support to check and raise a BadRequest when either the
configuration of bot couldn't be found or the BotHandler code of bot
couldn't be fetched. There can be cases where flaskbotrc contains config
details of a bot, but the user hasn't added it's handler class code. This
fixes server to handle such cases, by reporting it to user.
This also fixes the response of bot server to make it possible to skip
the response message.
2017-07-27 11:03:33 -07:00
..
tests bot server: Raise BadRequest when bot code can't be imported. 2017-07-27 11:03:33 -07:00
zulip_botserver bot server: Raise BadRequest when bot code can't be imported. 2017-07-27 11:03:33 -07:00
README.md flask_server: Move the server to its own package. 2017-07-18 01:31:54 -02:30
setup.py flask_server: Move the server to its own package. 2017-07-18 01:31:54 -02:30

zulip-bot-server --config-file <path to flaskbotrc> --hostname <address> --port <port>

Example: zulip-bot-server --config-file ~/flaskbotrc

This program loads the bot configurations from the config file (flaskbotrc here) and loads the bot modules. It then starts the server and fetches the requests to the above loaded modules and returns the success/failure result.

Please make sure you have a current flaskbotrc file with the configurations of the required bots. Hostname and Port are optional arguments. Default hostname is 127.0.0.1 and default port is 5002.