Files
updater/lib/sender.discord.go
2026-01-19 21:55:50 +01:00

17 lines
279 B
Go

package lib
import (
"bytes"
"encoding/json"
"net/http"
)
type DiscordSender struct {
Config Config
}
func (d DiscordSender) Send(msg string) {
b, _ := json.Marshal(map[string]string{"content": msg})
http.Post(d.Config.Webhook, "application/json", bytes.NewBuffer(b))
}