Killed history

This commit is contained in:
Kwoth
2021-09-06 21:29:22 +02:00
commit 7aca29ae8a
950 changed files with 366651 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using Newtonsoft.Json;
namespace Ayu.Discord.Voice.Models
{
public sealed class SelectProtocol
{
[JsonProperty("protocol")]
public string Protocol { get; set; }
[JsonProperty("data")]
public ProtocolData Data { get; set; }
public sealed class ProtocolData
{
[JsonProperty("address")]
public string Address { get; set; }
[JsonProperty("port")]
public int Port { get; set; }
[JsonProperty("mode")]
public string Mode { get; set; }
}
}
}

View File

@@ -0,0 +1,10 @@
using Newtonsoft.Json;
namespace Ayu.Discord.Voice.Models
{
public sealed class VoiceHello
{
[JsonProperty("heartbeat_interval")]
public int HeartbeatInterval { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using Newtonsoft.Json;
namespace Ayu.Discord.Voice.Models
{
public sealed class VoiceIdentify
{
[JsonProperty("server_id")]
public string ServerId { get; set; }
[JsonProperty("user_id")]
public string UserId { get; set; }
[JsonProperty("session_id")]
public string SessionId { get; set; }
[JsonProperty("token")]
public string Token { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Discord.Models.Gateway
{
public sealed class VoicePayload
{
[JsonProperty("op")]
public VoiceOpCode OpCode { get; set; }
[JsonProperty("d")]
public JToken Data { get; set; }
}
public enum VoiceOpCode
{
Identify = 0,
SelectProtocol = 1,
Ready = 2,
Heartbeat = 3,
SessionDescription = 4,
Speaking = 5,
HeartbeatAck = 6,
Resume = 7,
Hello = 8,
Resumed = 9,
ClientDisconnect = 13,
}
}

View File

@@ -0,0 +1,22 @@
using Newtonsoft.Json;
namespace Ayu.Discord.Voice.Models
{
public sealed class VoiceReady
{
[JsonProperty("ssrc")]
public uint Ssrc { get; set; }
[JsonProperty("ip")]
public string Ip { get; set; }
[JsonProperty("port")]
public int Port { get; set; }
[JsonProperty("modes")]
public string[] Modes { get; set; }
[JsonProperty("heartbeat_interval")]
public string HeartbeatInterval { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using Newtonsoft.Json;
namespace Ayu.Discord.Voice.Models
{
public sealed class VoiceResume
{
[JsonProperty("server_id")]
public string ServerId { get; set; }
[JsonProperty("session_id")]
public string SessionId { get; set; }
[JsonProperty("token")]
public string Token { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using Newtonsoft.Json;
namespace Ayu.Discord.Voice.Models
{
public sealed class VoiceSessionDescription
{
[JsonProperty("mode")]
public string Mode { get; set; }
[JsonProperty("secret_key")]
public byte[] SecretKey { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
using Newtonsoft.Json;
using System;
namespace Ayu.Discord.Voice.Models
{
public sealed class VoiceSpeaking
{
[JsonProperty("speaking")]
public int Speaking { get; set; }
[JsonProperty("delay")]
public int Delay { get; set; }
[JsonProperty("ssrc")]
public uint Ssrc { get; set; }
[Flags]
public enum State
{
None = 0,
Microphone = 1 << 0,
Soundshare = 1 << 1,
Priority = 1 << 2
}
}
}