modal method

Future<Interaction> modal(
  1. ModalBuilder modal
)

Responds to this by an ModalBuilder

Example :

Modal modal = Modal(customId: 'modal', label: 'My modal')
  .addInput(customId: 'my_text', label: 'First text')
  .addParagraph(customId: 'my_paragraph', label: 'Second text');

await interaction.modal(modal);

Implementation

Future<Interaction> modal (ModalBuilder modal) async {
  await ioc.use<DiscordApiHttpService>().post(url: "/interactions/$id/$token/callback")
    .payload({ 'type': InteractionCallbackType.modal.value, 'data': modal.toJson() })
    .build();

  return this;
}