Added Region.Vip
This commit is contained in:
@@ -21,5 +21,7 @@ namespace Discord.API.Client.Rest
|
||||
public string Id { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("vip")]
|
||||
public bool Vip { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ namespace Discord
|
||||
|
||||
//Cache other stuff
|
||||
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);
|
||||
break;
|
||||
}
|
||||
@@ -424,7 +424,7 @@ namespace Discord
|
||||
if (_regions.TryGetValue(id, out region))
|
||||
return region;
|
||||
else
|
||||
return new Region(id, id, "", 0);
|
||||
return new Region(id, id, "", 0, false);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -6,13 +6,15 @@
|
||||
public string Name { get; }
|
||||
public string Hostname { 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;
|
||||
Name = name;
|
||||
Hostname = hostname;
|
||||
Port = port;
|
||||
Vip = vip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user