initial commit

This commit is contained in:
2026-01-18 21:40:51 +01:00
commit 197a01440c
14 changed files with 374 additions and 0 deletions

18
lib/sender.discord.go Normal file
View File

@@ -0,0 +1,18 @@
package lib
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
type DiscordSender struct {
Config Config
}
func (d DiscordSender) Send(msg string) {
fmt.Printf("Send to Discord: %s\n", msg)
b, _ := json.Marshal(map[string]string{"content": msg})
http.Post(d.Config.Webhook, "application/json", bytes.NewBuffer(b))
}