diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index c6cf6adb..89a2982d 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -573,7 +573,7 @@ export interface APIMessage { /** * Any attached files * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * @@ -1415,7 +1415,7 @@ export interface APIEmbedField { } /** - * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ export interface APIAttachment { /** diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index 7710b171..9a2c3e4a 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -567,7 +567,7 @@ export interface APIMessage { /** * Any attached files * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure * * The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field * @@ -1382,7 +1382,7 @@ export interface APIEmbedField { } /** - * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ export interface APIAttachment { /** diff --git a/deno/rest/v10/channel.ts b/deno/rest/v10/channel.ts index 6e087010..dbd8b460 100644 --- a/deno/rest/v10/channel.ts +++ b/deno/rest/v10/channel.ts @@ -24,6 +24,7 @@ import type { SortOrderType, ForumLayoutType, ChannelFlags, + APIAttachment, } from '../../payloads/v10/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts'; import type { RESTAPIPoll } from './poll.ts'; @@ -260,22 +261,16 @@ export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesO export type APIMessageReferenceSend = RESTAPIMessageReference; /** - * https://discord.com/developers/docs/resources/channel#attachment-object + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ -export interface RESTAPIAttachment { +export type RESTAPIAttachment = Partial< + Pick +> & { /** * Attachment id or a number that matches `n` in `files[n]` */ id: Snowflake | number; - /** - * Name of the file - */ - filename?: string | undefined; - /** - * Description of the file - */ - description?: string | undefined; -} +}; /** * https://discord.com/developers/docs/resources/channel#create-message @@ -461,7 +456,7 @@ export interface RESTPatchAPIChannelMessageJSONBody { * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ attachments?: RESTAPIAttachment[] | undefined; /** diff --git a/deno/rest/v10/webhook.ts b/deno/rest/v10/webhook.ts index 0837d023..6e7d8f61 100644 --- a/deno/rest/v10/webhook.ts +++ b/deno/rest/v10/webhook.ts @@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ attachments?: RESTAPIAttachment[] | undefined; }; diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index 724602ae..11da76ad 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -24,6 +24,7 @@ import type { SortOrderType, ForumLayoutType, ChannelFlags, + APIAttachment, } from '../../payloads/v9/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts'; import type { RESTAPIPoll } from './poll.ts'; @@ -260,22 +261,16 @@ export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesO export type APIMessageReferenceSend = RESTAPIMessageReference; /** - * https://discord.com/developers/docs/resources/channel#attachment-object + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ -export interface RESTAPIAttachment { +export type RESTAPIAttachment = Partial< + Pick +> & { /** * Attachment id or a number that matches `n` in `files[n]` */ id: Snowflake | number; - /** - * Name of the file - */ - filename?: string | undefined; - /** - * Description of the file - */ - description?: string | undefined; -} +}; /** * https://discord.com/developers/docs/resources/channel#create-message @@ -477,7 +472,7 @@ export interface RESTPatchAPIChannelMessageJSONBody { * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ attachments?: RESTAPIAttachment[] | undefined; /** diff --git a/deno/rest/v9/webhook.ts b/deno/rest/v9/webhook.ts index 48c82436..1315f39a 100644 --- a/deno/rest/v9/webhook.ts +++ b/deno/rest/v9/webhook.ts @@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ attachments?: RESTAPIAttachment[] | undefined; }; diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index 9856813d..2018d46d 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -573,7 +573,7 @@ export interface APIMessage { /** * Any attached files * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * @@ -1415,7 +1415,7 @@ export interface APIEmbedField { } /** - * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ export interface APIAttachment { /** diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index 3562ae00..ad9ade05 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -567,7 +567,7 @@ export interface APIMessage { /** * Any attached files * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure * * The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field * @@ -1382,7 +1382,7 @@ export interface APIEmbedField { } /** - * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ export interface APIAttachment { /** diff --git a/rest/v10/channel.ts b/rest/v10/channel.ts index 8a0c9603..000eca8c 100644 --- a/rest/v10/channel.ts +++ b/rest/v10/channel.ts @@ -24,6 +24,7 @@ import type { SortOrderType, ForumLayoutType, ChannelFlags, + APIAttachment, } from '../../payloads/v10/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals'; import type { RESTAPIPoll } from './poll'; @@ -260,22 +261,16 @@ export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesO export type APIMessageReferenceSend = RESTAPIMessageReference; /** - * https://discord.com/developers/docs/resources/channel#attachment-object + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ -export interface RESTAPIAttachment { +export type RESTAPIAttachment = Partial< + Pick +> & { /** * Attachment id or a number that matches `n` in `files[n]` */ id: Snowflake | number; - /** - * Name of the file - */ - filename?: string | undefined; - /** - * Description of the file - */ - description?: string | undefined; -} +}; /** * https://discord.com/developers/docs/resources/channel#create-message @@ -461,7 +456,7 @@ export interface RESTPatchAPIChannelMessageJSONBody { * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ attachments?: RESTAPIAttachment[] | undefined; /** diff --git a/rest/v10/webhook.ts b/rest/v10/webhook.ts index 018c3ad2..6309633b 100644 --- a/rest/v10/webhook.ts +++ b/rest/v10/webhook.ts @@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ attachments?: RESTAPIAttachment[] | undefined; }; diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index 8fcc5272..7624aebd 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -24,6 +24,7 @@ import type { SortOrderType, ForumLayoutType, ChannelFlags, + APIAttachment, } from '../../payloads/v9/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals'; import type { RESTAPIPoll } from './poll'; @@ -260,22 +261,16 @@ export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesO export type APIMessageReferenceSend = RESTAPIMessageReference; /** - * https://discord.com/developers/docs/resources/channel#attachment-object + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ -export interface RESTAPIAttachment { +export type RESTAPIAttachment = Partial< + Pick +> & { /** * Attachment id or a number that matches `n` in `files[n]` */ id: Snowflake | number; - /** - * Name of the file - */ - filename?: string | undefined; - /** - * Description of the file - */ - description?: string | undefined; -} +}; /** * https://discord.com/developers/docs/resources/channel#create-message @@ -477,7 +472,7 @@ export interface RESTPatchAPIChannelMessageJSONBody { * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ attachments?: RESTAPIAttachment[] | undefined; /** diff --git a/rest/v9/webhook.ts b/rest/v9/webhook.ts index a11d6057..f5230ffc 100644 --- a/rest/v9/webhook.ts +++ b/rest/v9/webhook.ts @@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly * * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * - * See https://discord.com/developers/docs/resources/channel#attachment-object + * See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */ attachments?: RESTAPIAttachment[] | undefined; };