summaryrefslogtreecommitdiff
path: root/DiscoBot/Commands/MiscCommands.cs
diff options
context:
space:
mode:
authorDennis Kobert <d-kobert@web.de>2018-09-25 22:58:12 +0200
committerDennis Kobert <d-kobert@web.de>2018-09-25 22:58:12 +0200
commitd518a53b15b10a8b3a2d0335ea2d3a48aa610b5f (patch)
treedbc93dafdc8217cb69d5b407a54cc429aaa7a63a /DiscoBot/Commands/MiscCommands.cs
parent4b78a5d03e59a5d1456bc9ad24ee507e7c866432 (diff)
Updated to Discord.Net-2.00-beta
Diffstat (limited to 'DiscoBot/Commands/MiscCommands.cs')
-rw-r--r--DiscoBot/Commands/MiscCommands.cs9
1 files changed, 8 insertions, 1 deletions
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<Task>();
+ foreach (var message in messages)
+ {
+ waiters.Add((message as IUserMessage).DeleteAsync());
+ }
+
+ Task.WaitAll(waiters.ToArray());
}
}