1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-09-28 21:29:25 +00:00

API: fix unused payload

This commit is contained in:
mavolin 2020-05-12 02:16:08 +02:00
parent f597d11852
commit da42ff618a
No known key found for this signature in database
GPG key ID: D8681218EDF216DF

View file

@ -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 {