packages/discord.js/src/structures/interfaces/InteractionResponses.js
/**
   * Shows a modal component
   * @param {APIModal|ModalData|Modal} modal The modal to show
   */
Shows a modal component
@param {APIModal|ModalData|Modal} modal The modal to show
Shows a modal component @param { APIModal|ModalData|Modal } modal The modal to show
async showModal(modal) {
    if (this.deferred || this.replied) throw new Error('INTERACTION_ALREADY_REPLIED');
    await this.client.rest.post(Routes.interactionCallback(this.id, this.token), {
      body: {
        type: InteractionResponseType.Modal,
        data: isJSONEncodable(modal) ? modal.toJSON() : this.client.options.jsonTransformer(modal),
      },
    });
    this.replied = true;
  }
async showModal ( modal ) { if ( this . deferred || this . replied ) throw new Error ( 'INTERACTION_ALREADY_REPLIED' ) ; await this . client . rest . post ( Routes . interactionCallback ( this . id , this . token ) , { body : { type : InteractionResponseType . Modal , data : isJSONEncodable ( modal ) ? modal . toJSON ( ) : this . client . options . jsonTransformer ( modal ) , } , } ) ; this . replied = true ; }
Shows a modal component
 @param {APIModal|ModalData|Modal} modal The modal to show
Shows a modal component @param { APIModal|ModalData|Modal } modal The modal to show