Skip to content

Commit

Permalink
Change commands to be ! specific
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebag333 committed Oct 25, 2016
1 parent 3d2c192 commit 4366599
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bot/event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ def _handle_message(self, event):

if self.clients.is_bot_mention(msg_txt):
# e.g. user typed: "@pybot tell me a joke!"
if 'help' in msg_txt:
if '!help' in msg_txt:
self.msg_writer.write_help_message(event['channel'])
elif re.search('hi|hey|hello|howdy', msg_txt):
elif re.search('!hi|!hey|!hello|!howdy', msg_txt):
self.msg_writer.write_greeting(event['channel'], event['user'])
elif 'joke' in msg_txt:
elif '!joke' in msg_txt:
self.msg_writer.write_joke(event['channel'])
elif 'attachment' in msg_txt:
elif '!attachment' in msg_txt:
self.msg_writer.demo_attachment(event['channel'])
elif 'echo' in msg_txt:
elif '!echo' in msg_txt:
self.msg_writer.send_message(event['channel'], msg_txt)
elif '!fit' in msg_txt:
self.msg_writer.write_fit(event['channel'], msg_txt)
Expand Down

0 comments on commit 4366599

Please sign in to comment.