1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-02-11 05:52:58 +00:00

Merge pull request #53 from mavolin/39-empty-payload

This commit is contained in:
diamondburned 2020-05-11 17:17:29 -07:00 committed by GitHub
commit 36a18da10a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View file

@ -227,6 +227,9 @@ func (c *Client) AttachIntegration(
ID discord.Snowflake `json:"id"`
}
param.Type = integrationType
param.ID = integrationID
return c.FastRequest(
"POST",
EndpointGuilds+guildID.String()+"/integrations",

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 {