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:
commit
36a18da10a
|
@ -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",
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue