PluralKit/Myriad/Gateway/Payloads/GatewayIdentify.cs

30 lines
967 B
C#
Raw Permalink Normal View History

2021-08-27 15:03:47 +00:00
using System.Text.Json.Serialization;
2020-12-22 12:15:26 +00:00
namespace Myriad.Gateway;
public record GatewayIdentify
2020-12-22 12:15:26 +00:00
{
public string Token { get; init; }
public ConnectionProperties Properties { get; init; }
2020-12-22 12:15:26 +00:00
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Compress { get; init; }
2020-12-22 12:15:26 +00:00
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? LargeThreshold { get; init; }
2020-12-22 12:15:26 +00:00
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ShardInfo? Shard { get; init; }
2020-12-22 12:15:26 +00:00
public GatewayIntent Intents { get; init; }
2020-12-22 12:15:26 +00:00
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GatewayStatusUpdate? Presence { get; init; }
public record ConnectionProperties
{
[JsonPropertyName("$os")] public string Os { get; init; }
[JsonPropertyName("$browser")] public string Browser { get; init; }
[JsonPropertyName("$device")] public string Device { get; init; }
2020-12-22 12:15:26 +00:00
}
}