bots: Switch define bot to use send_reply.

This commit is contained in:
neiljp 2017-05-23 16:29:27 -07:00 committed by Tim Abbott
parent ecdc500440
commit d766687632
1 changed files with 1 additions and 13 deletions

View File

@ -25,19 +25,7 @@ class DefineHandler(object):
original_content = message['content'].strip()
bot_response = self.get_bot_define_response(original_content)
if message['type'] == 'private':
client.send_message(dict(
type='private',
to=message['sender_email'],
content=bot_response,
))
else:
client.send_message(dict(
type='stream',
to=message['display_recipient'],
subject=message['subject'],
content=bot_response,
))
client.send_reply(message, bot_response)
def get_bot_define_response(self, original_content):
split_content = original_content.split(' ')