From 4d04da7f7839c27f3a19f5cea4d4374264c0d37e Mon Sep 17 00:00:00 2001 From: Jannover5000r Date: Fri, 31 Oct 2025 10:16:47 +0100 Subject: [PATCH] !WebHook works now --- Botrun/BotStart.go | 1 + main.go | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Botrun/BotStart.go b/Botrun/BotStart.go index eec44f8..11bcc51 100644 --- a/Botrun/BotStart.go +++ b/Botrun/BotStart.go @@ -382,6 +382,7 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { } else { s.ChannelMessageSend(m.ChannelID, "Sending Webhook set to False") } + return } // Handle "!addaccount" only in guilds (not in DMs) if m.GuildID != "" && m.Content == "!addaccount" { diff --git a/main.go b/main.go index da759a3..100cfd6 100644 --- a/main.go +++ b/main.go @@ -33,8 +33,6 @@ type NamedTimetableEntry struct { ActivityType string `json:"activityType"` } -var WebHook = true - // init and main// func init() { godotenv.Load(".env") @@ -213,7 +211,8 @@ func Run(userID string) { } if userID == "default" { - if WebHook { + if BotStart.WebHook { + log.Println("WebHook status ", BotStart.WebHook) sendDiscordWebhook(subject, room, nextTime, status) } } else {