mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Killed history
This commit is contained in:
23
src/ayu/Ayu.Discord.Voice/Models/SelectProtocol.cs
Normal file
23
src/ayu/Ayu.Discord.Voice/Models/SelectProtocol.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
}
|
10
src/ayu/Ayu.Discord.Voice/Models/VoiceHello.cs
Normal file
10
src/ayu/Ayu.Discord.Voice/Models/VoiceHello.cs
Normal 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; }
|
||||
}
|
||||
}
|
20
src/ayu/Ayu.Discord.Voice/Models/VoiceIdentify.cs
Normal file
20
src/ayu/Ayu.Discord.Voice/Models/VoiceIdentify.cs
Normal 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; }
|
||||
|
||||
}
|
||||
}
|
29
src/ayu/Ayu.Discord.Voice/Models/VoicePayload.cs
Normal file
29
src/ayu/Ayu.Discord.Voice/Models/VoicePayload.cs
Normal 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,
|
||||
}
|
||||
}
|
22
src/ayu/Ayu.Discord.Voice/Models/VoiceReady.cs
Normal file
22
src/ayu/Ayu.Discord.Voice/Models/VoiceReady.cs
Normal 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; }
|
||||
}
|
||||
}
|
16
src/ayu/Ayu.Discord.Voice/Models/VoiceResume.cs
Normal file
16
src/ayu/Ayu.Discord.Voice/Models/VoiceResume.cs
Normal 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; }
|
||||
}
|
||||
}
|
13
src/ayu/Ayu.Discord.Voice/Models/VoiceSessionDescription.cs
Normal file
13
src/ayu/Ayu.Discord.Voice/Models/VoiceSessionDescription.cs
Normal 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; }
|
||||
}
|
||||
}
|
26
src/ayu/Ayu.Discord.Voice/Models/VoiceSpeaking.cs
Normal file
26
src/ayu/Ayu.Discord.Voice/Models/VoiceSpeaking.cs
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user