Skip to content

Commit

Permalink
fix: only a partial object is needed when updating attachments (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyynthia committed Dec 13, 2021
1 parent 315ce35 commit 7ab780b
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deno/rest/v8/channel.ts
Expand Up @@ -331,7 +331,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: APIAttachment[] | null;
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[];
/**
* The components to include with the message
*
Expand Down
2 changes: 1 addition & 1 deletion deno/rest/v8/webhook.ts
Expand Up @@ -234,7 +234,7 @@ export interface RESTPatchAPIWebhookWithTokenMessageJSONBody
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: APIAttachment[] | null;
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion deno/rest/v9/channel.ts
Expand Up @@ -365,7 +365,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: APIAttachment[] | null;
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[];
/**
* The components to include with the message
*
Expand Down
2 changes: 1 addition & 1 deletion deno/rest/v9/webhook.ts
Expand Up @@ -238,7 +238,7 @@ export interface RESTPatchAPIWebhookWithTokenMessageJSONBody
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: APIAttachment[] | null;
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion rest/v8/channel.ts
Expand Up @@ -331,7 +331,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: APIAttachment[] | null;
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[];
/**
* The components to include with the message
*
Expand Down
2 changes: 1 addition & 1 deletion rest/v8/webhook.ts
Expand Up @@ -234,7 +234,7 @@ export interface RESTPatchAPIWebhookWithTokenMessageJSONBody
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: APIAttachment[] | null;
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion rest/v9/channel.ts
Expand Up @@ -365,7 +365,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: APIAttachment[] | null;
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[];
/**
* The components to include with the message
*
Expand Down
2 changes: 1 addition & 1 deletion rest/v9/webhook.ts
Expand Up @@ -238,7 +238,7 @@ export interface RESTPatchAPIWebhookWithTokenMessageJSONBody
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: APIAttachment[] | null;
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[];
}

/**
Expand Down

0 comments on commit 7ab780b

Please sign in to comment.