ButtonInteraction.fromPayload constructor

ButtonInteraction.fromPayload(
  1. dynamic payload
)

Implementation

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