Browse Source

Fixed voice region caching

pull/97/head
RogueException 9 years ago
parent
commit
e16eb4e895
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/Discord.Net/WebSocket/DiscordClient.cs

+ 3
- 2
src/Discord.Net/WebSocket/DiscordClient.cs View File

@@ -160,8 +160,6 @@ namespace Discord.WebSocket
try try
{ {
await ApiClient.ValidateToken().ConfigureAwait(false); await ApiClient.ValidateToken().ConfigureAwait(false);
var voiceRegions = await ApiClient.GetVoiceRegions().ConfigureAwait(false);
_voiceRegions = voiceRegions.Select(x => new VoiceRegion(x)).ToImmutableDictionary(x => x.Id);
} }
catch (HttpException ex) catch (HttpException ex)
{ {
@@ -169,6 +167,9 @@ namespace Discord.WebSocket
} }
} }


var voiceRegions = await ApiClient.GetVoiceRegions().ConfigureAwait(false);
_voiceRegions = voiceRegions.Select(x => new VoiceRegion(x)).ToImmutableDictionary(x => x.Id);

LoginState = LoginState.LoggedIn; LoginState = LoginState.LoggedIn;
} }
catch (Exception) catch (Exception)


Loading…
Cancel
Save