more tweaks

This commit is contained in:
2026-01-20 00:55:17 +01:00
parent 43e9b2b993
commit 8bd16b99f0
5 changed files with 35 additions and 21 deletions

View File

@@ -7,15 +7,16 @@ import (
)
type DiscordSender struct {
Config Config
Webhook string
Fake bool
}
func (d DiscordSender) Send(msg string) {
b, _ := json.Marshal(map[string]string{"content": msg})
if d.Config.DiscordFake {
if d.Fake {
return
}
http.Post(d.Config.DiscordWebhook, "application/json", bytes.NewBuffer(b))
http.Post(d.Webhook, "application/json", bytes.NewBuffer(b))
}
func (d DiscordSender) SendBatch(msgs []string) {