addRecipient method

Future<void> addRecipient(
  1. Snowflake channelId,
  2. Snowflake userId,
  3. DmRecipientBuilder builder
)

Implementation

Future<void> addRecipient(Snowflake channelId, Snowflake userId, DmRecipientBuilder builder) async {
  final route = HttpRoute()
    ..channels(id: channelId.toString())
    ..recipients(id: userId.toString());
  final request = BasicRequest(route, method: 'PUT', body: jsonEncode(builder.build()));

  await client.httpHandler.executeSafe(request);
}