From 9371dfb59e1630e66b372b97e853697cac6327fe Mon Sep 17 00:00:00 2001 From: Awesome Stickz Date: Wed, 22 Apr 2026 23:28:03 +0530 Subject: [PATCH] fix!: mark FileComponent name, size fields as optional (#4960) Co-authored-by: Fleny --- packages/types/src/discord/components.ts | 4 ++-- packages/types/src/discordeno/components.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/types/src/discord/components.ts b/packages/types/src/discord/components.ts index b7c339eeb..cc9c95835 100644 --- a/packages/types/src/discord/components.ts +++ b/packages/types/src/discord/components.ts @@ -650,9 +650,9 @@ export interface DiscordFileComponent extends DiscordBaseComponent { /** Whether the media should be a spoiler (or blurred out). Defaults to `false` */ spoiler?: boolean; /** The name of the file. This field is ignored and provided by the API as part of the response */ - name: string; + name?: string; /** The size of the file in bytes. This field is ignored and provided by the API as part of the response */ - size: number; + size?: number; } /** https://docs.discord.com/developers/components/reference#separator-separator-structure */ diff --git a/packages/types/src/discordeno/components.ts b/packages/types/src/discordeno/components.ts index 9d688fd37..95f67853d 100644 --- a/packages/types/src/discordeno/components.ts +++ b/packages/types/src/discordeno/components.ts @@ -390,9 +390,9 @@ export interface FileComponent extends BaseComponent { /** Whether the media should be a spoiler (or blurred out). Defaults to `false` */ spoiler?: boolean; /** The name of the file. This field is ignored and provided by the API as part of the response */ - name: string; + name?: string; /** The size of the file in bytes. This field is ignored and provided by the API as part of the response */ - size: number; + size?: number; } /** https://docs.discord.com/developers/components/reference#separator */