Nagging only in CC

This commit is contained in:
Jacob Henry 2018-09-13 00:16:44 -04:00
parent bc25ffcb1e
commit 8d1168d5eb
2 changed files with 25 additions and 21 deletions

View File

@ -8,6 +8,8 @@ COMMAND_CENTER_ID = "GCR631LQ1"
SLAVES_TO_THE_MACHINE_ID = "C9WUQBYNP" SLAVES_TO_THE_MACHINE_ID = "C9WUQBYNP"
BOTZONE = "C3BF2MFKM" BOTZONE = "C3BF2MFKM"
NOT_ALLOWED_HERE = "There's a time and place for everything, but not here!"
# Define our patterns # Define our patterns
channel_check_pattern = r"channel id\s*(.*)" channel_check_pattern = r"channel id\s*(.*)"

View File

@ -27,8 +27,10 @@ class Job(object):
def nag_callback(slack, msg, match): def nag_callback(slack, msg, match):
# Only allow in # Only allow in command center
if msg["channel"] != channel_util.COMMAND_CENTER_ID:
response = channel_util.NOT_ALLOWED_HERE
else:
# Get the day # Get the day
day = match.group(1).lower() day = match.group(1).lower()