Skip to content

Commit

Permalink
feat(PatchAPIWebhookMessage): add file property
Browse files Browse the repository at this point in the history
This means you can now add or patch files when you send a request with a webhook!

Reference: discord/discord-api-docs@70e1cce
  • Loading branch information
vladfrangu committed Apr 10, 2021
1 parent 598cbfb commit fc2f3c5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
16 changes: 14 additions & 2 deletions deno/rest/v8/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,21 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = Nullable<
*/
export type RESTPatchAPIWebhookWithTokenMessageFormDataBody =
| {
payload_json: string;
/**
* JSON stringified message body
*/
payload_json?: string;
/**
* The file contents
*/
file: unknown;
}
| RESTPatchAPIWebhookWithTokenMessageJSONBody;
| (RESTPatchAPIWebhookWithTokenMessageJSONBody & {
/**
* The file contents
*/
file: unknown;
});

/**
* https://discord.com/developers/docs/resources/webhook#edit-webhook-message
Expand Down
16 changes: 14 additions & 2 deletions rest/v8/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,21 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = Nullable<
*/
export type RESTPatchAPIWebhookWithTokenMessageFormDataBody =
| {
payload_json: string;
/**
* JSON stringified message body
*/
payload_json?: string;
/**
* The file contents
*/
file: unknown;
}
| RESTPatchAPIWebhookWithTokenMessageJSONBody;
| (RESTPatchAPIWebhookWithTokenMessageJSONBody & {
/**
* The file contents
*/
file: unknown;
});

/**
* https://discord.com/developers/docs/resources/webhook#edit-webhook-message
Expand Down

0 comments on commit fc2f3c5

Please sign in to comment.