From 550145114d67bd8d206039f7136422698849114a Mon Sep 17 00:00:00 2001 From: robbix1206 Date: Thu, 21 Sep 2017 20:11:41 +0200 Subject: [PATCH] Add ChannelID to WebhookeEdit (#434) --- restapi.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/restapi.go b/restapi.go index 1a682fa..9a58836 100644 --- a/restapi.go +++ b/restapi.go @@ -1822,12 +1822,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 {