mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 18:20:11 +00:00
Initial commit, basic proxying working
This commit is contained in:
parent
c3f6becea4
commit
a6fbd869be
109 changed files with 3539 additions and 359 deletions
4
Myriad/Gateway/Payloads/GatewayHello.cs
Normal file
4
Myriad/Gateway/Payloads/GatewayHello.cs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
namespace Myriad.Gateway
|
||||
{
|
||||
public record GatewayHello(int HeartbeatInterval);
|
||||
}
|
||||
28
Myriad/Gateway/Payloads/GatewayIdentify.cs
Normal file
28
Myriad/Gateway/Payloads/GatewayIdentify.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Myriad.Gateway
|
||||
{
|
||||
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
|
||||
{
|
||||
[JsonPropertyName("$os")] public string Os { get; init; }
|
||||
[JsonPropertyName("$browser")] public string Browser { get; init; }
|
||||
[JsonPropertyName("$device")] public string Device { get; init; }
|
||||
}
|
||||
}
|
||||
}
|
||||
4
Myriad/Gateway/Payloads/GatewayResume.cs
Normal file
4
Myriad/Gateway/Payloads/GatewayResume.cs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
namespace Myriad.Gateway
|
||||
{
|
||||
public record GatewayResume(string Token, string SessionId, int Seq);
|
||||
}
|
||||
23
Myriad/Gateway/Payloads/GatewayStatusUpdate.cs
Normal file
23
Myriad/Gateway/Payloads/GatewayStatusUpdate.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
using Myriad.Types;
|
||||
|
||||
namespace Myriad.Gateway
|
||||
{
|
||||
public record GatewayStatusUpdate
|
||||
{
|
||||
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; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue