list method

Future<List<GuildEmoji>> list()

List the emojis in the guild.

Implementation

Future<List<GuildEmoji>> list() async {
  _checkIsConcrete();

  final route = HttpRoute()
    ..guilds(id: guildId.toString())
    ..emojis();
  final request = BasicRequest(route);

  final response = await client.httpHandler.executeSafe(request);
  final emojis = parseMany(response.jsonBody as List<Object?>, (Map<String, Object?> raw) => parse(raw) as GuildEmoji);

  emojis.forEach(client.updateCacheWith);
  return emojis;
}