changed: You can now run .prune in dms to delete 100 of bot's messages

docs: Upped version to 5.3.7
docs: Updated commandlist
This commit is contained in:
Kwoth
2025-01-21 01:21:57 +00:00
parent eaab60898f
commit 86f9d901fe
3 changed files with 30 additions and 10 deletions

View File

@@ -32,6 +32,25 @@ public partial class Administration
}
}
[Cmd]
[RequireContext(ContextType.DM)]
[NadekoOptions<PruneOptions>]
public async Task Prune()
{
var progressMsg = await Response().Pending(strs.prune_progress(0, 100)).SendAsync();
var progress = GetProgressTracker(progressMsg);
var result = await _service.PruneWhere(ctx.Channel,
100,
x => x.Author.Id == ctx.Client.CurrentUser.Id,
progress);
ctx.Message.DeleteAfter(3);
await SendResult(result);
await progressMsg.DeleteAsync();
}
//deletes her own messages, no perm required
[Cmd]
[RequireContext(ContextType.Guild)]
@@ -114,9 +133,9 @@ public partial class Administration
await progressMsg.ModifyAsync(props =>
{
props.Embed = CreateEmbed()
.WithPendingColor()
.WithDescription(GetText(strs.prune_progress(deleted, total)))
.Build();
.WithPendingColor()
.WithDescription(GetText(strs.prune_progress(deleted, total)))
.Build();
});
}
catch