From fb77f4bad4f098629f160a8459984a04d85ca412 Mon Sep 17 00:00:00 2001 From: PIG208 <359101898@qq.com> Date: Thu, 13 May 2021 19:25:15 +0800 Subject: [PATCH] terminal: Apply BotHandler for TerminalBotHandler. --- zulip_bots/zulip_bots/simple_lib.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zulip_bots/zulip_bots/simple_lib.py b/zulip_bots/zulip_bots/simple_lib.py index 58e9e96..76046ff 100644 --- a/zulip_bots/zulip_bots/simple_lib.py +++ b/zulip_bots/zulip_bots/simple_lib.py @@ -42,12 +42,19 @@ class SimpleMessageServer: class TerminalBotHandler: def __init__(self, bot_config_file): self.bot_config_file = bot_config_file - self.storage = SimpleStorage() + self._storage = SimpleStorage() self.message_server = SimpleMessageServer() + @property + def storage(self): + return self._storage + def identity(self): return BotIdentity("bot name", "bot-email@domain") + def react(self, message, emoji_name): + raise NotImplementedError + def send_message(self, message): if message['type'] == 'stream': print('''