Added .banprune command which sets how many days worth of messages will be pruned when bot (soft)bans a person either through a command or another punishment feature. Also updated .next usage string.

This commit is contained in:
Kwoth
2022-08-31 17:47:19 +02:00
parent cd6fe46c2b
commit 59a1e56dad
17 changed files with 10258 additions and 13 deletions

View File

@@ -358,9 +358,10 @@ public class MuteService : INService
IGuild guild,
IUser user,
TimeSpan after,
string reason)
string reason,
int pruneDays)
{
await guild.AddBanAsync(user.Id, 0, reason);
await guild.AddBanAsync(user.Id, pruneDays, reason);
await using (var uow = _db.GetDbContext())
{
var config = uow.GuildConfigsForId(guild.Id, set => set.Include(x => x.UnbanTimer));