ModalInteraction.from constructor

ModalInteraction.from({
  1. required dynamic payload,
})

Implementation

factory ModalInteraction.from({ required dynamic payload }) {
  return ModalInteraction(
    payload['id'],
    null,
    payload['application_id'],
    payload['version'],
    payload['type'],
    payload['token'],
    payload['member']?['user']?['id'],
    payload['guild_id'],
    payload['data']['custom_id'],
    payload['channel_id'],
  );
}