This commit is contained in:
Kwoth 2016-07-24 18:00:25 +02:00
parent b9d81fb88a
commit facf138bee

View File

@ -636,7 +636,8 @@ namespace NadekoBot.Modules.Administration
Message[] msgs;
if (string.IsNullOrWhiteSpace(e.GetArg("user_or_num"))) // if nothing is set, clear nadeko's messages, no permissions required
{
msgs = (await e.Channel.DownloadMessages(100).ConfigureAwait(false)).Where(m => m.User.Id == e.Server.CurrentUser.Id).ToArray();
msgs = (await e.Channel.DownloadMessages(100).ConfigureAwait(false));//.Where(m => m.User.Id == e.Server.CurrentUser.Id).ToArray();
msgs = msgs.Where(m => m.User.Id == e.Server.CurrentUser.Id).ToArray();
if (!msgs.Any())
return;
await e.Channel.DeleteMessages(msgs).ConfigureAwait(false);