beginPrune method

Future<int?> beginPrune(
  1. String guildId, {
  2. int? days,
  3. List<String>? includeRoles,
  4. bool? computePruneCount,
})

Implementation

Future<int?> beginPrune(
  String guildId, {
  int? days,
  List<String>? includeRoles,
  bool? computePruneCount,
}) {
  var endpoint = '/guilds/$guildId/prune';
  return _http.request(
    endpoint,
    converter: (j) => j['pruned'],
    method: 'post',
    query: {
      ...insertNotNull('days', days, str: true),
      ...insertNotNull('compute_prune_count', computePruneCount, str: true),
      ...insertNotNull('include_roles', includeRoles?.join(';')),
    },
  );
}