Merge pull request #445 from robbix1206/webhookEditChannelID

BREAKING CHANGE - Add ChannelID to WebhookEdit (#434)
This commit is contained in:
Bruce 2018-04-04 10:54:12 -05:00 committed by GitHub
commit 75d58fe706
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1907,12 +1907,13 @@ func (s *Session) WebhookWithToken(webhookID, token string) (st *Webhook, err er
// webhookID: The ID of a webhook.
// name : The name of the webhook.
// avatar : The avatar of the webhook.
func (s *Session) WebhookEdit(webhookID, name, avatar string) (st *Role, err error) {
func (s *Session) WebhookEdit(webhookID, name, avatar, channelID string) (st *Role, err error) {
data := struct {
Name string `json:"name,omitempty"`
Avatar string `json:"avatar,omitempty"`
}{name, avatar}
Name string `json:"name,omitempty"`
Avatar string `json:"avatar,omitempty"`
ChannelID string `json:"channel_id,omitempty"`
}{name, avatar, channelID}
body, err := s.RequestWithBucketID("PATCH", EndpointWebhook(webhookID), data, EndpointWebhooks)
if err != nil {