parseMessageComponentInteractionData method

MessageComponentInteractionData parseMessageComponentInteractionData(
  1. Map<String, Object?> raw,
  2. {Snowflake? guildId,
  3. Snowflake? channelId}
)

Implementation

MessageComponentInteractionData parseMessageComponentInteractionData(Map<String, Object?> raw, {Snowflake? guildId, Snowflake? channelId}) {
  return MessageComponentInteractionData(
    customId: raw['custom_id'] as String,
    type: MessageComponentType.parse(raw['component_type'] as int),
    values: maybeParseMany(raw['values']),
    resolved: maybeParse(raw['resolved'], (Map<String, Object?> raw) => parseResolvedData(raw, guildId: guildId, channelId: channelId)),
  );
}