WebHook command now also toggles Lesson update message

This commit is contained in:
Jannover5000r 2026-01-28 09:47:06 +00:00
parent 110e4a5104
commit 3bf0158260

View file

@ -615,6 +615,7 @@ func sendDiscordWebhook(subject string, room string, nextTime string, Status str
} }
func sendUpdateDiscordWebhookWithDetails(changes []string) { func sendUpdateDiscordWebhookWithDetails(changes []string) {
if BotStart.WebHook {
log.Println("Sending detailed Discord webhook notification...") log.Println("Sending detailed Discord webhook notification...")
message := "**Timetable Update**\n\n" + strings.Join(changes, "\n") message := "**Timetable Update**\n\n" + strings.Join(changes, "\n")
@ -642,4 +643,5 @@ func sendUpdateDiscordWebhookWithDetails(changes []string) {
body, _ := ioutil.ReadAll(resp.Body) body, _ := ioutil.ReadAll(resp.Body)
log.Printf("Discord webhook failed with status %d: %s", resp.StatusCode, string(body)) log.Printf("Discord webhook failed with status %d: %s", resp.StatusCode, string(body))
} }
}
} }