@@ -21,5 +21,7 @@ namespace Discord.API.Client.Rest | |||||
public string Id { get; set; } | public string Id { get; set; } | ||||
[JsonProperty("name")] | [JsonProperty("name")] | ||||
public string Name { get; set; } | public string Name { get; set; } | ||||
[JsonProperty("vip")] | |||||
public bool Vip { get; set; } | |||||
} | } | ||||
} | } |
@@ -259,7 +259,7 @@ namespace Discord | |||||
//Cache other stuff | //Cache other stuff | ||||
var regionsResponse = (await ClientAPI.Send(new GetVoiceRegionsRequest()).ConfigureAwait(false)); | var regionsResponse = (await ClientAPI.Send(new GetVoiceRegionsRequest()).ConfigureAwait(false)); | ||||
_regions = regionsResponse.Select(x => new Region(x.Id, x.Name, x.Hostname, x.Port)) | |||||
_regions = regionsResponse.Select(x => new Region(x.Id, x.Name, x.Hostname, x.Port, x.Vip)) | |||||
.ToDictionary(x => x.Id); | .ToDictionary(x => x.Id); | ||||
break; | break; | ||||
} | } | ||||
@@ -424,7 +424,7 @@ namespace Discord | |||||
if (_regions.TryGetValue(id, out region)) | if (_regions.TryGetValue(id, out region)) | ||||
return region; | return region; | ||||
else | else | ||||
return new Region(id, id, "", 0); | |||||
return new Region(id, id, "", 0, false); | |||||
} | } | ||||
#endregion | #endregion | ||||
@@ -6,13 +6,15 @@ | |||||
public string Name { get; } | public string Name { get; } | ||||
public string Hostname { get; } | public string Hostname { get; } | ||||
public int Port { get; } | public int Port { get; } | ||||
public bool Vip { get; } | |||||
internal Region(string id, string name, string hostname, int port) | |||||
internal Region(string id, string name, string hostname, int port, bool vip) | |||||
{ | { | ||||
Id = id; | Id = id; | ||||
Name = name; | Name = name; | ||||
Hostname = hostname; | Hostname = hostname; | ||||
Port = port; | Port = port; | ||||
Vip = vip; | |||||
} | } | ||||
} | } | ||||
} | } |