listActiveThreads method

Future<ThreadList> listActiveThreads(
  1. Snowflake id
)

List the active threads in a guild.

Implementation

Future<ThreadList> listActiveThreads(Snowflake id) async {
  final route = HttpRoute()
    ..guilds(id: id.toString())
    ..threads()
    ..active();
  final request = BasicRequest(route);

  final response = await client.httpHandler.executeSafe(request);
  final list = client.channels.parseThreadList(response.jsonBody as Map<String, Object?>, guildId: id);

  client.updateCacheWith(list);
  return list;
}