more refact
This commit is contained in:
@@ -3,7 +3,6 @@ package lib
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -12,7 +11,6 @@ type DiscordSender struct {
|
||||
}
|
||||
|
||||
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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user