Repository: discordjs/discord.js
File: packages/discord.js/typings/index.d.ts (TypeScript)

Code before:
  public getSelectedChannels<const Type extends ChannelType = ChannelType>(
    customId: string,
    required?: boolean,
    channelTypes?: readonly Type[],
  ): ReadonlyCollection<
    Snowflake,
    Extract<
      NonNullable<CommandInteractionOption<Cached>['channel']>,
      {
        type: Type extends ChannelType.AnnouncementThread | ChannelType.PublicThread
          ? ChannelType.AnnouncementThread | ChannelType.PublicThread
          : Type;
      }
    >
  > | null;

  public getSelectedRoles(customId: string, required: true): NonNullable<SelectMenuModalData<Cached>['roles']>;
  public getSelectedRoles(
    customId: string,
    required?: boolean,
  ): NonNullable<SelectMenuModalData<Cached>['roles']> | null;

  public getSelectedMentionables(customId: string, required: true): ModalSelectedMentionables<Cached>;
  public getSelectedMentionables(customId: string, required?: boolean): ModalSelectedMentionables<Cached> | null;
  public getUploadedFiles(customId: string, required: true): ReadonlyCollection<string, Attachment>;
  public getUploadedFiles(customId: string, required?: boolean): ReadonlyCollection<string, Attachment> | null;
}

export interface ModalMessageModalSubmitInteraction<Cached extends CacheType = CacheType>
  extends ModalSubmitInteraction<Cached> {
  channelId: Snowflake;
  inCachedGuild(): this is ModalMessageModalSubmitInteraction<'cached'>;
  inGuild(): this is ModalMessageModalSubmitInteraction<'cached' | 'raw'>;
  inRawGuild(): this is ModalMessageModalSubmitInteraction<'raw'>;
  message: Message<BooleanCache<Cached>>;
  update(
    options: InteractionUpdateOptions & { withResponse: true },
  ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
  update(
    options: InteractionUpdateOptions | MessagePayload | string,
  ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
  update(options: InteractionUpdateOptions & { withResponse: false }): Promise<undefined>;
}

export class ModalSubmitInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> {
  private constructor(client: Client<true>, data: APIModalSubmitInteraction);
  public type: InteractionType.ModalSubmit;
  public readonly customId: string;
  public readonly components: ModalComponentResolver<Cached>;
  public deferred: boolean;
  public ephemeral: boolean | null;

Review comment (suggestion):
```suggestion
  public getUploadedFiles(customId: string, required?: boolean): ReadonlyCollection<Snowflake, Attachment> | null;
```

Code after:
  public getSelectedChannels<const Type extends ChannelType = ChannelType>(
    customId: string,
    required?: boolean,
    channelTypes?: readonly Type[],
  ): ReadonlyCollection<
    Snowflake,
    Extract<
      NonNullable<CommandInteractionOption<Cached>['channel']>,
      {
        type: Type extends ChannelType.AnnouncementThread | ChannelType.PublicThread
          ? ChannelType.AnnouncementThread | ChannelType.PublicThread
          : Type;
      }
    >
  > | null;

  public getSelectedRoles(customId: string, required: true): NonNullable<SelectMenuModalData<Cached>['roles']>;
  public getSelectedRoles(
    customId: string,
    required?: boolean,
  ): NonNullable<SelectMenuModalData<Cached>['roles']> | null;

  public getSelectedMentionables(customId: string, required: true): ModalSelectedMentionables<Cached>;
  public getSelectedMentionables(customId: string, required?: boolean): ModalSelectedMentionables<Cached> | null;
  public getUploadedFiles(customId: string, required: true): ReadonlyCollection<Snowflake, Attachment>;
  public getUploadedFiles(customId: string, required?: boolean): ReadonlyCollection<Snowflake, Attachment> | null;
}

export interface ModalMessageModalSubmitInteraction<Cached extends CacheType = CacheType>
  extends ModalSubmitInteraction<Cached> {
  channelId: Snowflake;
  inCachedGuild(): this is ModalMessageModalSubmitInteraction<'cached'>;
  inGuild(): this is ModalMessageModalSubmitInteraction<'cached' | 'raw'>;
  inRawGuild(): this is ModalMessageModalSubmitInteraction<'raw'>;
  message: Message<BooleanCache<Cached>>;
  update(
    options: InteractionUpdateOptions & { withResponse: true },
  ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
  update(
    options: InteractionUpdateOptions | MessagePayload | string,
  ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
  update(options: InteractionUpdateOptions & { withResponse: false }): Promise<undefined>;
}

export class ModalSubmitInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> {
  private constructor(client: Client<true>, data: APIModalSubmitInteraction);
  public type: InteractionType.ModalSubmit;
  public readonly customId: string;
  public readonly components: ModalComponentResolver<Cached>;
  public deferred: boolean;
  public ephemeral: boolean | null;