!WebHook works now

This commit is contained in:
Jannover5000r 2025-10-31 10:16:47 +01:00
parent 7646684136
commit 4d04da7f78
2 changed files with 3 additions and 3 deletions

View file

@ -382,6 +382,7 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
} else { } else {
s.ChannelMessageSend(m.ChannelID, "Sending Webhook set to False") s.ChannelMessageSend(m.ChannelID, "Sending Webhook set to False")
} }
return
} }
// Handle "!addaccount" only in guilds (not in DMs) // Handle "!addaccount" only in guilds (not in DMs)
if m.GuildID != "" && m.Content == "!addaccount" { if m.GuildID != "" && m.Content == "!addaccount" {

View file

@ -33,8 +33,6 @@ type NamedTimetableEntry struct {
ActivityType string `json:"activityType"` ActivityType string `json:"activityType"`
} }
var WebHook = true
// init and main// // init and main//
func init() { func init() {
godotenv.Load(".env") godotenv.Load(".env")
@ -213,7 +211,8 @@ func Run(userID string) {
} }
if userID == "default" { if userID == "default" {
if WebHook { if BotStart.WebHook {
log.Println("WebHook status ", BotStart.WebHook)
sendDiscordWebhook(subject, room, nextTime, status) sendDiscordWebhook(subject, room, nextTime, status)
} }
} else { } else {