From f597d11852c63ff92c7e40bd26cb59378ab84d0e Mon Sep 17 00:00:00 2001 From: mavolin <48887425+mavolin@users.noreply.github.com> Date: Mon, 11 May 2020 20:32:28 +0200 Subject: [PATCH 1/2] API: fix #39 --- api/guild.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/guild.go b/api/guild.go index 0d67394..fd6902c 100644 --- a/api/guild.go +++ b/api/guild.go @@ -226,6 +226,9 @@ func (c *Client) AttachIntegration( ID discord.Snowflake `json:"id"` } + param.Type = integrationType + param.ID = integrationID + return c.FastRequest( "POST", EndpointGuilds+guildID.String()+"/integrations", From da42ff618a2095d701d95ab09cba374c55dcd12d Mon Sep 17 00:00:00 2001 From: mavolin <48887425+mavolin@users.noreply.github.com> Date: Tue, 12 May 2020 02:16:08 +0200 Subject: [PATCH 2/2] API: fix unused payload --- api/webhook.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/api/webhook.go b/api/webhook.go index c44b25c..df7f9b9 100644 --- a/api/webhook.go +++ b/api/webhook.go @@ -58,7 +58,11 @@ func (c *Client) ModifyWebhook( data ModifyWebhookData) (*discord.Webhook, error) { var w *discord.Webhook - return w, c.RequestJSON(&w, "PATCH", EndpointWebhooks+webhookID.String()) + return w, c.RequestJSON( + &w, "PATCH", + EndpointWebhooks+webhookID.String(), + httputil.WithJSONBody(data), + ) } func (c *Client) ModifyWebhookWithToken( @@ -66,7 +70,11 @@ func (c *Client) ModifyWebhookWithToken( data ModifyWebhookData, token string) (*discord.Webhook, error) { var w *discord.Webhook - return w, c.RequestJSON(&w, "PATCH", EndpointWebhooks+webhookID.String()+"/"+token) + return w, c.RequestJSON( + &w, "PATCH", + EndpointWebhooks+webhookID.String()+"/"+token, + httputil.WithJSONBody(data), + ) } func (c *Client) DeleteWebhook(webhookID discord.Snowflake) error {