parse method
Parse the raw
data received from the API into an instance of the type of this manager.
Implementation
@override
GuildSticker parse(Map<String, Object?> raw) {
return GuildSticker(
manager: this,
id: Snowflake.parse(raw['id']!),
name: raw['name'] as String,
description: raw['description'] as String?,
tags: raw['tags'] as String,
type: StickerType.parse(raw['type'] as int),
formatType: StickerFormatType.parse(raw['format_type'] as int),
available: raw['available'] as bool? ?? false,
guildId: Snowflake.parse(raw['guild_id']!),
user: ((raw['user'] ?? {}) as Map)['id'] != null ? client.users[Snowflake.parse((raw['user'] as Map<String, Object?>)['id']!)] : null,
sortValue: raw['sort_value'] as int?,
);
}