Change GameParty size types to longs. (#955)

This commit is contained in:
Alex Gravely
2018-02-17 18:38:14 -05:00
committed by Christopher F
parent 3b2b434258
commit 178ea8de4d
3 changed files with 9 additions and 9 deletions

View File

@@ -1,11 +1,11 @@
namespace Discord
namespace Discord
{
public class GameParty
{
internal GameParty() { }
public string Id { get; internal set; }
public int Members { get; internal set; }
public int Capacity { get; internal set; }
public long Members { get; internal set; }
public long Capacity { get; internal set; }
}
}

View File

@@ -1,4 +1,4 @@
using Newtonsoft.Json;
using Newtonsoft.Json;
namespace Discord.API
{
@@ -7,6 +7,6 @@ namespace Discord.API
[JsonProperty("id")]
public string Id { get; set; }
[JsonProperty("size")]
public int[] Size { get; set; }
public long[] Size { get; set; }
}
}

View File

@@ -1,4 +1,4 @@
namespace Discord.WebSocket
namespace Discord.WebSocket
{
internal static class EntityExtensions
{
@@ -56,7 +56,7 @@
public static GameParty ToEntity(this API.GameParty model)
{
// 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)
{
current = model.Size[0];