api: upgrade audio client to VoiceWS v3
This commit is contained in:
10
src/Discord.Net.WebSocket/API/Voice/HelloEvent.cs
Normal file
10
src/Discord.Net.WebSocket/API/Voice/HelloEvent.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API.Voice
|
||||
{
|
||||
internal class HelloEvent
|
||||
{
|
||||
[JsonProperty("heartbeat_interval")]
|
||||
public int HeartbeatInterval { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace Discord.API.Voice
|
||||
{
|
||||
@@ -14,6 +15,7 @@ namespace Discord.API.Voice
|
||||
[JsonProperty("modes")]
|
||||
public string[] Modes { get; set; }
|
||||
[JsonProperty("heartbeat_interval")]
|
||||
[Obsolete("This field is errorneous and should not be used", true)]
|
||||
public int HeartbeatInterval { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CS1591
|
||||
namespace Discord.API.Voice
|
||||
{
|
||||
internal enum VoiceOpCode : byte
|
||||
@@ -11,11 +11,19 @@ namespace Discord.API.Voice
|
||||
Ready = 2,
|
||||
/// <summary> C→S - Used to keep the connection alive and measure latency. </summary>
|
||||
Heartbeat = 3,
|
||||
/// <summary> C←S - Used to reply to a client's heartbeat. </summary>
|
||||
HeartbeatAck = 3,
|
||||
/// <summary> C←S - Used to provide an encryption key to the client. </summary>
|
||||
SessionDescription = 4,
|
||||
/// <summary> C↔S - Used to inform that a certain user is speaking. </summary>
|
||||
Speaking = 5
|
||||
Speaking = 5,
|
||||
/// <summary> C←S - Used to reply to a client's heartbeat. </summary>
|
||||
HeartbeatAck = 6,
|
||||
/// <summary> C→S - Used to resume a connection. </summary>
|
||||
Resume = 7,
|
||||
/// <summary> C←S - Used to inform the client the heartbeat interval. </summary>
|
||||
Hello = 8,
|
||||
/// <summary> C←S - Used to acknowledge a resumed connection. </summary>
|
||||
Resumed = 9,
|
||||
/// <summary> C←S - Used to notify that a client has disconnected. </summary>
|
||||
ClientDisconnect = 13,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user