Update Administration.cs

This commit is contained in:
samvaio 2016-12-01 17:08:25 +05:30 committed by GitHub
parent c019ce3130
commit fbb50d4df2

View File

@ -639,8 +639,7 @@ namespace NadekoBot.Modules.Administration
{ {
var channel = (ITextChannel)umsg.Channel; var channel = (ITextChannel)umsg.Channel;
var user = channel.Guild.GetCurrentUser(); var user = channel.Guild.GetCurrentUser();
var enumerable = (await umsg.Channel.GetMessagesAsync()).AsEnumerable(); var enumerable = (await umsg.Channel.GetMessagesAsync()).Where(x => x.Author.Id == user.Id);
enumerable = enumerable.Where(x => x.Author.Id == user.Id);
await umsg.Channel.DeleteMessagesAsync(enumerable); await umsg.Channel.DeleteMessagesAsync(enumerable);
} }