21 lines
360 B
Go
21 lines
360 B
Go
package web
|
|
|
|
import (
|
|
"net/url"
|
|
|
|
"go.etztech.xyz/go-mcm/internal"
|
|
)
|
|
|
|
func (web *Web) Discord(message string, ping bool) (*internal.Status, error) {
|
|
endpoint := web.endpoint("discord")
|
|
|
|
form := url.Values{}
|
|
form.Add("api", web.Token)
|
|
form.Add("message", message)
|
|
if ping {
|
|
form.Add("ping", "True")
|
|
}
|
|
|
|
return internal.ResponseStatus(endpoint, form)
|
|
}
|