followChannel method

Future<FollowedChannel> followChannel(
  1. Snowflake id,
  2. Snowflake toFollow
)

Add a channel to another channel's followers.

Implementation

Future<FollowedChannel> followChannel(Snowflake id, Snowflake toFollow) async {
  final route = HttpRoute()
    ..channels(id: toFollow.toString())
    ..followers();
  final request = BasicRequest(route, method: 'POST', body: jsonEncode({'webhook_channel_id': id.toString()}));

  final response = await client.httpHandler.executeSafe(request);

  return parseFollowedChannel(response.jsonBody as Map<String, Object?>);
}