Remove triage_message() function from all the contrib-bots.

To make all bots consistent add shared function in bot_lib.py
to check if this bot is called. All bots respond to at-mention of
the bot instead of their specific names.
This commit is contained in:
Abhijeet Kaur 2017-02-17 03:26:32 +05:30 committed by showell
parent a87ae4b1c4
commit 9a8dc7c622
18 changed files with 134 additions and 281 deletions

View file

@ -113,11 +113,6 @@ class JohnHandler(object):
called "VirtualHelp" that your API user can send to.
'''
def triage_message(self, message, client):
original_content = message['content'].lower()
return (original_content.startswith("@john") or
original_content.startswith("@**john**"))
def handle_message(self, message, client, state_handler):
original_content = message['content']
client.send_message(dict(