diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index c6cf6adb5..3d0f3bf01 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-attachment-structure */ export interface APIAttachment { /** @@ -1479,7 +1479,7 @@ export interface APIAttachment { } /** - * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-structure-attachment-flags */ export enum AttachmentFlags { /** diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index 7710b1714..022fa40c2 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-attachment-structure */ export interface APIAttachment { /** @@ -1446,7 +1446,7 @@ export interface APIAttachment { } /** - * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-structure-attachment-flags */ export enum AttachmentFlags { /** 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/payloads/v10/channel.ts b/payloads/v10/channel.ts index 9856813d7..a8714396b 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-attachment-structure */ export interface APIAttachment { /** @@ -1479,7 +1479,7 @@ export interface APIAttachment { } /** - * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-structure-attachment-flags */ export enum AttachmentFlags { /** diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index 3562ae008..a5d7deb38 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-attachment-structure */ export interface APIAttachment { /** @@ -1446,7 +1446,7 @@ export interface APIAttachment { } /** - * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags + * https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-structure-attachment-flags */ export enum AttachmentFlags { /** 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; };