From d518a53b15b10a8b3a2d0335ea2d3a48aa610b5f Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Tue, 25 Sep 2018 22:58:12 +0200 Subject: Updated to Discord.Net-2.00-beta --- DiscoBot/Commands/MiscCommands.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'DiscoBot/Commands/MiscCommands.cs') diff --git a/DiscoBot/Commands/MiscCommands.cs b/DiscoBot/Commands/MiscCommands.cs index bef39c6..53bc42c 100644 --- a/DiscoBot/Commands/MiscCommands.cs +++ b/DiscoBot/Commands/MiscCommands.cs @@ -180,7 +180,14 @@ namespace DiscoBot.Commands if (Permissions.Check(Context, new[] { "Admin", "Mod", "Meister" })) { - await Context.Channel.DeleteMessagesAsync(messages); + + var waiters = new List(); + foreach (var message in messages) + { + waiters.Add((message as IUserMessage).DeleteAsync()); + } + + Task.WaitAll(waiters.ToArray()); } } -- cgit v1.2.3-70-g09d2