ContextMessageInteraction.from constructor

ContextMessageInteraction.from({
  1. required Message message,
  2. required dynamic payload,
})

Implementation

factory ContextMessageInteraction.from({ required Message message, required dynamic payload }) {
  return ContextMessageInteraction(
    payload['channel_id'],
    message,
    payload['type'],
    payload['id'],
    payload['data']['name'],
    payload['application_id'],
    payload['version'],
    payload['type'],
    payload['token'],
    payload['member']?['user']?['id'],
    payload['guild_id'],
  );
}