feat: upgrade to .NET 6, refactor everything
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
namespace Myriad.Gateway
|
||||
{
|
||||
public record GatewayHello(int HeartbeatInterval);
|
||||
}
|
||||
namespace Myriad.Gateway;
|
||||
|
||||
public record GatewayHello(int HeartbeatInterval);
|
@@ -1,28 +1,27 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Myriad.Gateway
|
||||
namespace Myriad.Gateway;
|
||||
|
||||
public record GatewayIdentify
|
||||
{
|
||||
public record GatewayIdentify
|
||||
public string Token { get; init; }
|
||||
public ConnectionProperties Properties { get; init; }
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public bool? Compress { get; init; }
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public int? LargeThreshold { get; init; }
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public ShardInfo? Shard { get; init; }
|
||||
|
||||
public GatewayIntent Intents { get; init; }
|
||||
|
||||
public record ConnectionProperties
|
||||
{
|
||||
public string Token { get; init; }
|
||||
public ConnectionProperties Properties { get; init; }
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public bool? Compress { get; init; }
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public int? LargeThreshold { get; init; }
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public ShardInfo? Shard { get; init; }
|
||||
|
||||
public GatewayIntent Intents { 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; }
|
||||
}
|
||||
[JsonPropertyName("$os")] public string Os { get; init; }
|
||||
[JsonPropertyName("$browser")] public string Browser { get; init; }
|
||||
[JsonPropertyName("$device")] public string Device { get; init; }
|
||||
}
|
||||
}
|
@@ -1,4 +1,3 @@
|
||||
namespace Myriad.Gateway
|
||||
{
|
||||
public record GatewayResume(string Token, string SessionId, int Seq);
|
||||
}
|
||||
namespace Myriad.Gateway;
|
||||
|
||||
public record GatewayResume(string Token, string SessionId, int Seq);
|
@@ -3,23 +3,22 @@ using System.Text.Json.Serialization;
|
||||
using Myriad.Serialization;
|
||||
using Myriad.Types;
|
||||
|
||||
namespace Myriad.Gateway
|
||||
{
|
||||
public record GatewayStatusUpdate
|
||||
{
|
||||
[JsonConverter(typeof(JsonSnakeCaseStringEnumConverter))]
|
||||
public enum UserStatus
|
||||
{
|
||||
Online,
|
||||
Dnd,
|
||||
Idle,
|
||||
Invisible,
|
||||
Offline
|
||||
}
|
||||
namespace Myriad.Gateway;
|
||||
|
||||
public ulong? Since { get; init; }
|
||||
public ActivityPartial[]? Activities { get; init; }
|
||||
public UserStatus Status { get; init; }
|
||||
public bool Afk { get; init; }
|
||||
public record GatewayStatusUpdate
|
||||
{
|
||||
[JsonConverter(typeof(JsonSnakeCaseStringEnumConverter))]
|
||||
public enum UserStatus
|
||||
{
|
||||
Online,
|
||||
Dnd,
|
||||
Idle,
|
||||
Invisible,
|
||||
Offline
|
||||
}
|
||||
|
||||
public ulong? Since { get; init; }
|
||||
public ActivityPartial[]? Activities { get; init; }
|
||||
public UserStatus Status { get; init; }
|
||||
public bool Afk { get; init; }
|
||||
}
|
Reference in New Issue
Block a user