terminal: Implement react for TerminalBotHandler.

Fixes: #686
This commit is contained in:
PIG208 2021-05-13 19:38:29 +08:00 committed by Tim Abbott
parent 0b35ed0a93
commit b04f5f9753

View file

@ -53,7 +53,10 @@ class TerminalBotHandler:
return BotIdentity("bot name", "bot-email@domain")
def react(self, message, emoji_name):
raise NotImplementedError
print("""The bot reacts to message #{}: {}""".format(message["id"], emoji_name))
return self.message_server.add_reaction(dict(message_id=message['id'],
emoji_name=emoji_name,
reaction_type='unicode_emoji'))
def send_message(self, message):
if message['type'] == 'stream':