diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index c6cf6adb5..89a2982da 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 7710b1714..9a2c3e4ae 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 6e0870100..dbd8b4606 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 0837d0230..6e7d8f612 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 724602ae0..11da76ad2 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 48c824366..1315f39a4 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/package-lock.json b/package-lock.json index 271963840..5406434f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -454,9 +454,9 @@ } }, "node_modules/@babel/generator": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.4.tgz", - "integrity": "sha512-NFtZmZsyzDPJnk9Zg3BbTfKKc9UlHYzD0E//p2Z3B9nCwwtJW9T0gVbCz8+fBngnn4zf1Dr3IK8PHQQHq0lDQw==", + "version": "7.25.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.5.tgz", + "integrity": "sha512-abd43wyLfbWoxC6ahM8xTkqLpGB2iWBVyuKC9/srhFunCd1SDNrV1s72bBpK4hLj8KLzHBBcOblvLQZBNw9r3w==", "dev": true, "license": "MIT", "dependencies": { diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index 9856813d7..2018d46db 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 3562ae008..ad9ade054 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 8a0c96034..000eca8cc 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 018c3ad23..6309633b2 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 8fcc52729..7624aebd9 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 a11d60570..f5230ffcb 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; };