terminal: Apply BotHandler for TerminalBotHandler.
This commit is contained in:
parent
05eaaff802
commit
fb77f4bad4
|
@ -42,12 +42,19 @@ class SimpleMessageServer:
|
||||||
class TerminalBotHandler:
|
class TerminalBotHandler:
|
||||||
def __init__(self, bot_config_file):
|
def __init__(self, bot_config_file):
|
||||||
self.bot_config_file = bot_config_file
|
self.bot_config_file = bot_config_file
|
||||||
self.storage = SimpleStorage()
|
self._storage = SimpleStorage()
|
||||||
self.message_server = SimpleMessageServer()
|
self.message_server = SimpleMessageServer()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def storage(self):
|
||||||
|
return self._storage
|
||||||
|
|
||||||
def identity(self):
|
def identity(self):
|
||||||
return BotIdentity("bot name", "bot-email@domain")
|
return BotIdentity("bot name", "bot-email@domain")
|
||||||
|
|
||||||
|
def react(self, message, emoji_name):
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
def send_message(self, message):
|
def send_message(self, message):
|
||||||
if message['type'] == 'stream':
|
if message['type'] == 'stream':
|
||||||
print('''
|
print('''
|
||||||
|
|
Loading…
Reference in a new issue