update method
- Snowflake id,
- covariant StickerUpdateBuilder builder,
- {String? auditLogReason}
override
Update the item with the given id
in the API.
Implementers should ensure this method updates the cache.
Implementation
@override
Future<GuildSticker> update(Snowflake id, StickerUpdateBuilder builder, {String? auditLogReason}) async {
final route = HttpRoute()
..guilds(id: guildId.toString())
..stickers(id: id.toString());
final request = BasicRequest(route, body: jsonEncode(builder.build()), method: 'PATCH', auditLogReason: auditLogReason);
final response = await client.httpHandler.executeSafe(request);
final sticker = parse(response.jsonBody as Map<String, Object?>);
client.updateCacheWith(sticker);
return sticker;
}