.prune @someone x fixed
This commit is contained in:
parent
7aa06f3631
commit
eadcde8397
@ -359,12 +359,14 @@ namespace NadekoBot.Modules.Administration
|
||||
if (count < 1)
|
||||
return;
|
||||
|
||||
if (count > 100)
|
||||
count = 100;
|
||||
|
||||
if (user.Id == Context.User.Id)
|
||||
count += 1;
|
||||
|
||||
int limit = (count < 100) ? count : 100;
|
||||
var enumerable = (await Context.Channel.GetMessagesAsync(limit: limit).Flatten())
|
||||
.Where(m => m.Author == user && DateTime.UtcNow - m.CreatedAt < twoWeeks);
|
||||
var enumerable = (await Context.Channel.GetMessagesAsync().Flatten())
|
||||
.Where(m => m.Author.Id == user.Id && DateTime.UtcNow - m.CreatedAt < twoWeeks)
|
||||
.Take(count);
|
||||
await Context.Channel.DeleteMessagesAsync(enumerable).ConfigureAwait(false);
|
||||
|
||||
Context.Message.DeleteAfter(3);
|
||||
|
@ -290,7 +290,7 @@
|
||||
"help_cmdlist_donate": "You can support the project on patreon: <{0}> or paypal: <{1}>",
|
||||
"help_cmd_and_alias": "Commands and aliases",
|
||||
"help_commandlist_regen": "Commandlist regenerated.",
|
||||
"help_commands_instr": "Type `{0}h CommandName` to see the help for that specified command. e.g. `{0}h >8ball`",
|
||||
"help_commands_instr": "Type `{0}h CommandName` to see the help for that specified command. e.g. `{0}h {0}8ball`",
|
||||
"help_command_not_found": "I can't find that command. Please verify that the command exists before trying again.",
|
||||
"help_desc": "Description",
|
||||
"help_donate": "You can support the NadekoBot project on \nPatreon <{0}> or\nPaypal <{1}>\nDon't forget to leave your discord name or id in the message.\n\n**Thank you** ♥️",
|
||||
|
Loading…
Reference in New Issue
Block a user