From 2659237b3f0b3f8b1845275c3cb0c55c5e2c9965 Mon Sep 17 00:00:00 2001 From: Jannover5000r <90698896+Jannover5000r@users.noreply.github.com> Date: Sun, 23 Aug 2026 01:39:17 +0200 Subject: [PATCH] added a new if clause to check if the time is past or before 3am before sending the class update message This will hopefully remove the spam everyday --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 1e43345..fd60b0c 100644 --- a/main.go +++ b/main.go @@ -209,6 +209,8 @@ func scheduleTimetableUpdate() { // Get current date to filter out new day changes today := time.Now().Format("02-01-2006") + // Get current time to filter any changes to Timetable before 3am so the new day changes stop + now := time.Now() for _, e := range currentEntries { key := lessonKey(e) @@ -227,6 +229,9 @@ func scheduleTimetableUpdate() { if curr.Date != today { continue } + if now.Hour() < 3 { + continue + } if prev, exists := prevMap[key]; exists { // Existing lesson — check for changes