.prune makes more sense, and a rogue bug fixed

This commit is contained in:
Master Kwoth 2017-06-17 13:25:02 +02:00
parent 733f2bfe15
commit 936ee30e1f

View File

@ -42,11 +42,11 @@ namespace NadekoBot.Modules.Administration
[Priority(0)] [Priority(0)]
public async Task Prune(int count) public async Task Prune(int count)
{ {
count++;
if (count < 1) if (count < 1)
return; return;
if (count > 1000) if (count > 1000)
count = 1000; count = 1000;
await Context.Message.DeleteAsync().ConfigureAwait(false);
await _prune.PruneWhere((ITextChannel)Context.Channel, count, x => true).ConfigureAwait(false); await _prune.PruneWhere((ITextChannel)Context.Channel, count, x => true).ConfigureAwait(false);
} }
@ -58,6 +58,9 @@ namespace NadekoBot.Modules.Administration
[Priority(1)] [Priority(1)]
public async Task Prune(IGuildUser user, int count = 100) public async Task Prune(IGuildUser user, int count = 100)
{ {
if (user.Id == Context.User.Id)
count++;
if (count < 1) if (count < 1)
return; return;