summaryrefslogtreecommitdiff
path: root/DiscoBot/Commands/MiscCommands.cs
diff options
context:
space:
mode:
authorDennis Kobert <d-kobert@web.de>2018-09-26 16:34:47 +0200
committerDennis Kobert <d-kobert@web.de>2018-09-26 16:34:47 +0200
commit8bcbb70baffeefcb67487c7d5066c23180fae154 (patch)
treed24fef732438ad1854a2ae1d4af4f186d5ff95d9 /DiscoBot/Commands/MiscCommands.cs
parent655295045f78a81b9f80d98b61cfd14fc1436a1d (diff)
parentd518a53b15b10a8b3a2d0335ea2d3a48aa610b5f (diff)
Merge branch 'Discord2.0'
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());
}
}