fix: only a partial object is needed when updating attachments (#263)

This commit is contained in:
Cynthia
2021-12-13 10:08:39 +01:00
committed by GitHub
parent 315ce35849
commit 7ab780b3ae
8 changed files with 8 additions and 8 deletions

View File

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

View File

@@ -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'>>)[];
}
/**

View File

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

View File

@@ -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'>>)[];
}
/**

View File

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

View File

@@ -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'>>)[];
}
/**

View File

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

View File

@@ -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'>>)[];
}
/**