ban method

Future<void> ban({
  1. int? count,
  2. String? reason,
})

banned this from the Guild and deleted its messages for a given period

await member.ban();

With the deletion of his messages for 7 days

await member.ban(count: 7);

Implementation

Future<void> ban ({ int? count, String? reason }) async {
  Response response = await ioc.use<DiscordApiHttpService>().put(url: "/guilds/${guild.id}/bans/${user.id}")
    .payload({ 'delete_message_days': count, 'reason': reason })
    .build();

  if (response.statusCode == 200) {
    _timeoutDuration = null;
  }
}