update discord properties

* username optional
* channel optional and remove it from payload

Signed-off-by: Christopher Banck <christopher@banck.net>
This commit is contained in:
Christopher Banck 2022-02-08 10:52:21 +01:00
parent 171b5eb216
commit f365f3796e
1 changed files with 0 additions and 9 deletions

View File

@ -48,14 +48,6 @@ func NewDiscord(hookURL string, proxyURL string, username string, channel string
hookURL = webhook.String()
}
if username == "" {
return nil, errors.New("empty Discord username")
}
if channel == "" {
return nil, errors.New("empty Discord channel")
}
return &Discord{
Channel: channel,
URL: hookURL,
@ -72,7 +64,6 @@ func (s *Discord) Post(event events.Event) error {
}
payload := SlackPayload{
Channel: s.Channel,
Username: s.Username,
}
if payload.Username == "" {