From 63e82563259b30c4979acd3d8f29c737259e8f3e Mon Sep 17 00:00:00 2001 From: elixir-zatech <51458181+elixir-zatech@users.noreply.github.com> Date: Thu, 6 Jun 2019 20:24:54 +0200 Subject: [PATCH] Updated main.py to add an exclude array for users Updated main.py to add an exclude array for users so that community members can explicitly opt out. --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index 791ea5edb..ea931b536 100644 --- a/main.py +++ b/main.py @@ -12,6 +12,9 @@ from requests import post from slackclient import SlackClient +EXCLUDE_USERS = [ + 'UC2PXG134' +] HITS = [ 'guyz', @@ -45,6 +48,8 @@ def process_message_event(client, event): return user = event['user'] if any(hit in text.lower() for hit in HITS): + if any(excludeUser.lower() in user.lower() for excludeUser in EXCLUDE_USERS): + return client.api_call( 'chat.postEphemeral', channel=channel,