Browse Source

Change GameParty size types to longs. (#955)

tags/2.0
Alex Gravely Christopher F 7 years ago
parent
commit
178ea8de4d
3 changed files with 9 additions and 9 deletions
  1. +4
    -4
      src/Discord.Net.Core/Entities/Activities/GameParty.cs
  2. +3
    -3
      src/Discord.Net.Rest/API/Common/GameParty.cs
  3. +2
    -2
      src/Discord.Net.WebSocket/Extensions/EntityExtensions.cs

+ 4
- 4
src/Discord.Net.Core/Entities/Activities/GameParty.cs 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; }
}
}
}

+ 3
- 3
src/Discord.Net.Rest/API/Common/GameParty.cs 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; }
}
}
}

+ 2
- 2
src/Discord.Net.WebSocket/Extensions/EntityExtensions.cs 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];


Loading…
Cancel
Save