diff --git a/src/core/announcement_queue.py b/src/core/announcement_queue.py index eebcbb5..3db8c63 100644 --- a/src/core/announcement_queue.py +++ b/src/core/announcement_queue.py @@ -150,7 +150,14 @@ def check_for_announcement(event: dict[str, Any], time: datetime) -> str | None: message: str | None = None + is_cancelled = False + if ("[CANCELLED]" in title) or ("[CANCELED]" in title): + is_cancelled = True + match description: + case x if is_cancelled: + message = f"The {title} event has been canceled :bangbang:" + case x if SLACK_NONTECHNICAL_SEMINAR_KEYWORD.lower() in x: message = f" The Non-Technical Seminar {title} will be happening {f'in the {loc} ' if loc else ''}in {MINUTES_BEFORE_EVENT_PING} minutes!"