fix!: mark FileComponent name, size fields as optional (#4960)

Co-authored-by: Fleny <Fleny113@outlook.com>
This commit is contained in:
Awesome Stickz
2026-04-22 23:28:03 +05:30
committed by GitHub
parent b52313edbc
commit 9371dfb59e
2 changed files with 4 additions and 4 deletions

View File

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

View File

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