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

@ -77,16 +77,6 @@ class CommuteHandler(object):
you can use the timezone bot.
'''
def triage_message(self, message, client):
original_content = message['content']
# This next line of code is defensive, as we
# never want to get into an infinite loop of posting follow
# ups for own follow ups!
if message['display_recipient'] == 'commute':
return False
is_commute = original_content.startswith('@commute')
return is_commute
# adds API Authentication Key to url request
def get_api_key(self):
# commute_bot.config must have been moved from