diff --git a/uqcsbot/holidays.py b/uqcsbot/holidays.py index d4eaea0..f9044a8 100644 --- a/uqcsbot/holidays.py +++ b/uqcsbot/holidays.py @@ -68,6 +68,9 @@ def get_holidays_from_page(holiday_page: str) -> List[Holiday]: holiday = Holiday(date, description, url) holidays.append(holiday) + if holidays == []: + logging.warn("Failed to get holidays from page.") + return holidays @@ -113,8 +116,11 @@ async def holiday(self): Posts a random celebratory day on #general from https://www.timeanddate.com/holidays/fun/ """ + logging.info("Running daily holiday task") + holiday = get_holiday() if holiday is None: + logging.info("No holiday was found for today") return general_channel = discord.utils.get(