ban method

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

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

Example :

await member.ban();

With the deletion of his messages for 7 days

Example :

await member.ban(count: 7);

Implementation

Future<void> ban ({ int? count, String? reason }) async {

  Response response = await ioc.use<HttpService>().put(url: "/guilds/${guild.id}/bans/${user.id}", payload: {
    'delete_message_days': count,
    'reason': reason
  });

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