Prevented dry firing of nagbot

This commit is contained in:
Jacob Henry 2018-10-09 18:50:29 -04:00
parent 9cd325869e
commit a888d365f9
1 changed files with 4 additions and 0 deletions

View File

@ -35,6 +35,10 @@ def nag_callback(slack, msg, match):
# Filter to day
jobs = [j for j in jobs if j.day == day]
# If no jobs found, somethings up. Probably mispelled day.
if not jobs:
slack_util.reply(slack, msg, "No jobs found. Check that the day is spelled correctly, with no extra symbols", in_thread=True)
# Nag each
response = "Do yer jerbs! They are as follows:\n"
for job in jobs: