Improve async and reconnect stability. Added support for websocket 1012

This commit is contained in:
RogueException
2015-12-26 03:58:43 -04:00
parent 75174e67bd
commit 375c25c813
10 changed files with 62 additions and 29 deletions

View File

@@ -51,14 +51,14 @@ namespace Discord.Commands
.Description("Returns information about commands.")
.Do(async e =>
{
Channel replyChannel = _config.HelpMode == HelpMode.Public ? e.Channel : await e.User.CreateChannel();
Channel replyChannel = _config.HelpMode == HelpMode.Public ? e.Channel : await e.User.CreateChannel().ConfigureAwait(false);
if (e.Args.Length > 0) //Show command help
{
var map = _map.GetItem(string.Join(" ", e.Args));
if (map != null)
await ShowCommandHelp(map, e.User, e.Channel, replyChannel);
await ShowCommandHelp(map, e.User, e.Channel, replyChannel).ConfigureAwait(false);
else
await replyChannel.SendMessage("Unable to display help: Unknown command.");
await replyChannel.SendMessage("Unable to display help: Unknown command.").ConfigureAwait(false);
}
else //Show general help
await ShowGeneralHelp(e.User, e.Channel, replyChannel);