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'.
This commit is contained in:
Abhijeet Kaur
2017-06-08 08:19:42 +05:30
committed by showell
parent d45d9c9ab5
commit 68777e93a0
4 changed files with 11 additions and 11 deletions

View File

@@ -15,7 +15,7 @@ if os.path.exists(os.path.join(our_dir, '../api/zulip')):
from zulip import Client
from bots_api.run import get_lib_module
from bots_api.bot_lib import BotHandlerApi, StateHandler
from bots_api.bot_lib import ExternalBotHandler, StateHandler
bots_config = {} # type: Dict[str, Mapping[str, str]]
available_bots = [] # type: List[str]
@@ -50,7 +50,7 @@ def handle_bot(bot):
client = Client(email=bots_config[bot]["email"],
api_key=bots_config[bot]["key"],
site=bots_config[bot]["site"])
restricted_client = BotHandlerApi(client)
restricted_client = ExternalBotHandler(client)
message_handler = bots_lib_module[bot].handler_class()
# TODO: Handle stateful bots properly.