parseEmbed method
Implementation
Embed parseEmbed(Map<String, Object?> raw) {
return Embed(
title: raw['title'] as String?,
description: raw['description'] as String?,
url: maybeParse(raw['url'], Uri.parse),
timestamp: maybeParse(raw['timestamp'], DateTime.parse),
color: maybeParse(raw['color'], DiscordColor.new),
footer: maybeParse(raw['footer'], parseEmbedFooter),
image: maybeParse(raw['image'], parseEmbedImage),
thumbnail: maybeParse(raw['thumbnail'], parseEmbedThumbnail),
video: maybeParse(raw['video'], parseEmbedVideo),
provider: maybeParse(raw['provider'], parseEmbedProvider),
author: maybeParse(raw['author'], parseEmbedAuthor),
fields: maybeParseMany(raw['fields'], parseEmbedField),
);
}