From d237a83969eec3819248907fd69dc7a7015676de Mon Sep 17 00:00:00 2001 From: jowj Date: Sun, 21 Jan 2018 23:17:21 -0600 Subject: [PATCH] More broken code changes; getting closer, I think. --- mojojojo-bot.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mojojojo-bot.py b/mojojojo-bot.py index b0dd199..9b0173d 100644 --- a/mojojojo-bot.py +++ b/mojojojo-bot.py @@ -75,12 +75,10 @@ if __name__ == "__main__": events = slack_client.rtm_read() for event in events: if ( - 'channel' in event and - 'text' in event and + 'bots-like-gaston' in event and + 'AI ' in event and event.get(type) == 'message' ) : - channel = event['bots-like-gaston'] - text = event['AI'] if "AI " in text.lower and link not in text: slack_client.api_call( "reactions.add",