From fbb50d4df29ccaf740824b9127617f4123dd15d5 Mon Sep 17 00:00:00 2001 From: samvaio Date: Thu, 1 Dec 2016 17:08:25 +0530 Subject: [PATCH] Update Administration.cs --- src/NadekoBot/Modules/Administration/Administration.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index b267fe2d..a958a5b9 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -639,8 +639,7 @@ namespace NadekoBot.Modules.Administration { var channel = (ITextChannel)umsg.Channel; var user = channel.Guild.GetCurrentUser(); - var enumerable = (await umsg.Channel.GetMessagesAsync()).AsEnumerable(); - enumerable = enumerable.Where(x => x.Author.Id == user.Id); + var enumerable = (await umsg.Channel.GetMessagesAsync()).Where(x => x.Author.Id == user.Id); await umsg.Channel.DeleteMessagesAsync(enumerable); }