more tweaks
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user