diff options
author | Dennis Kobert <d-kobert@web.de> | 2018-09-26 16:34:47 +0200 |
---|---|---|
committer | Dennis Kobert <d-kobert@web.de> | 2018-09-26 16:34:47 +0200 |
commit | 8bcbb70baffeefcb67487c7d5066c23180fae154 (patch) | |
tree | d24fef732438ad1854a2ae1d4af4f186d5ff95d9 /DiscoBot/Commands | |
parent | 655295045f78a81b9f80d98b61cfd14fc1436a1d (diff) | |
parent | d518a53b15b10a8b3a2d0335ea2d3a48aa610b5f (diff) |
Merge branch 'Discord2.0'
Diffstat (limited to 'DiscoBot/Commands')
-rw-r--r-- | DiscoBot/Commands/MiscCommands.cs | 9 |
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()); } } |