From 6990185736b8973e07507c53745dc2767fee4df2 Mon Sep 17 00:00:00 2001 From: Jacob Henry Date: Sun, 30 Sep 2018 21:02:42 -0400 Subject: [PATCH] Made slave less spammy --- slavestothemachine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slavestothemachine.py b/slavestothemachine.py index 5f276dc..3baeac1 100644 --- a/slavestothemachine.py +++ b/slavestothemachine.py @@ -33,7 +33,8 @@ def count_work_callback(slack, msg, match): # Three: check if we found anything if len(new_work) == 0: - slack_util.reply(slack, msg, "No work recognized. Use words {} or work will not be recorded".format(counted_data)) + if re.search(r'\s\d\s', text) is not None: + slack_util.reply(slack, msg, "No work recognized. Use words {} or work will not be recorded".format(counted_data)) return # Three: Add it to their total work. We key by user_id, to avoid annoying identity shit