Change GameParty size types to longs. (#955)
This commit is contained in:
committed by
Christopher F
parent
3b2b434258
commit
178ea8de4d
@@ -1,11 +1,11 @@
|
|||||||
namespace Discord
|
namespace Discord
|
||||||
{
|
{
|
||||||
public class GameParty
|
public class GameParty
|
||||||
{
|
{
|
||||||
internal GameParty() { }
|
internal GameParty() { }
|
||||||
|
|
||||||
public string Id { get; internal set; }
|
public string Id { get; internal set; }
|
||||||
public int Members { get; internal set; }
|
public long Members { get; internal set; }
|
||||||
public int Capacity { get; internal set; }
|
public long Capacity { get; internal set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Discord.API
|
namespace Discord.API
|
||||||
{
|
{
|
||||||
@@ -7,6 +7,6 @@ namespace Discord.API
|
|||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
[JsonProperty("size")]
|
[JsonProperty("size")]
|
||||||
public int[] Size { get; set; }
|
public long[] Size { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Discord.WebSocket
|
namespace Discord.WebSocket
|
||||||
{
|
{
|
||||||
internal static class EntityExtensions
|
internal static class EntityExtensions
|
||||||
{
|
{
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
public static GameParty ToEntity(this API.GameParty model)
|
public static GameParty ToEntity(this API.GameParty model)
|
||||||
{
|
{
|
||||||
// Discord will probably send bad data since they don't validate anything
|
// Discord will probably send bad data since they don't validate anything
|
||||||
int current = 0, cap = 0;
|
long current = 0, cap = 0;
|
||||||
if (model.Size?.Length == 2)
|
if (model.Size?.Length == 2)
|
||||||
{
|
{
|
||||||
current = model.Size[0];
|
current = model.Size[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user