diff --git a/src/Discord.Net.Core/Discord.Net.Core.xml b/src/Discord.Net.Core/Discord.Net.Core.xml index ca9e9696f..059d9d16b 100644 --- a/src/Discord.Net.Core/Discord.Net.Core.xml +++ b/src/Discord.Net.Core/Discord.Net.Core.xml @@ -1978,6 +1978,53 @@ A task that represents the asynchronous stop operation. + + + Indicates that the bot would like to speak within a stage channel. + + The options to be used when sending the request. + + A task that represents the asynchronous request to speak operation. + + + + + Makes the current user become a speaker within a stage. + + The options to be used when sending the request. + + A task that represents the asynchronous speaker modify operation. + + + + + Makes the current user a listener. + + The options to be used when sending the request. + + A task that represents the asynchronous stop operation. + + + + + Makes a user a speaker within a stage. + + The user to make the speaker. + The options to be used when sending the request. + + A task that represents the asynchronous move operation. + + + + + Removes a user from speaking. + + The user to remove from speaking. + The options to be used when sending the request. + + A task that represents the asynchronous remove operation. + + Represents a generic channel in a guild that can send and receive messages. @@ -7550,6 +7597,14 @@ This must be less than the constant defined by . + + + Gets or sets a single embed for this message. + + + This property will be added to the array, in the future please use the array rather then this property. + + Gets or sets the embeds of the message. diff --git a/src/Discord.Net.Rest/Discord.Net.Rest.xml b/src/Discord.Net.Rest/Discord.Net.Rest.xml index c8865f786..920e0bf60 100644 --- a/src/Discord.Net.Rest/Discord.Net.Rest.xml +++ b/src/Discord.Net.Rest/Discord.Net.Rest.xml @@ -2313,6 +2313,18 @@ + + + + + + + + + + + + Represents a REST-based channel in a guild that can send and receive messages. diff --git a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj index b61a63032..7014c9d30 100644 --- a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj +++ b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj @@ -1,4 +1,4 @@ - + @@ -17,9 +17,10 @@ ..\Discord.Net.WebSocket\Discord.Net.WebSocket.xml - + TRACE + diff --git a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml index aac3f2132..d22c00429 100644 --- a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml +++ b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml @@ -2189,6 +2189,11 @@ + + + Returns if the current user is a speaker within the stage, otherwise . + + Gets a collection of users who are speakers within the stage. @@ -2206,6 +2211,18 @@ + + + + + + + + + + + + Represents a WebSocket-based channel in a guild that can send and receive messages. diff --git a/src/Discord.Net.WebSocket/DiscordSocketApiClient.cs b/src/Discord.Net.WebSocket/DiscordSocketApiClient.cs index 449bf8e04..9221a3faa 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketApiClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketApiClient.cs @@ -75,8 +75,15 @@ namespace Discord.API using (var jsonReader = new JsonTextReader(reader)) { var msg = _serializer.Deserialize(jsonReader); + if (msg != null) + { +#if DEBUG_PACKETS + Console.WriteLine($"<- {msg.Operation} [{msg.Type ?? "none"}] : {(msg.Payload as Newtonsoft.Json.Linq.JToken)?.ToString().Length}"); +#endif + await _receivedGatewayEvent.InvokeAsync((GatewayOpCode)msg.Operation, msg.Sequence, msg.Type, msg.Payload).ConfigureAwait(false); + } } } }; @@ -87,7 +94,13 @@ namespace Discord.API { var msg = _serializer.Deserialize(jsonReader); if (msg != null) + { +#if DEBUG_PACKETS + Console.WriteLine($"<- {msg.Operation} [{msg.Type ?? "none"}] : {(msg.Payload as Newtonsoft.Json.Linq.JToken)?.ToString().Length}"); +#endif + await _receivedGatewayEvent.InvokeAsync((GatewayOpCode)msg.Operation, msg.Sequence, msg.Type, msg.Payload).ConfigureAwait(false); + } } }; WebSocketClient.Closed += async ex => @@ -214,8 +227,8 @@ namespace Discord.API await RequestQueue.SendAsync(new WebSocketRequest(WebSocketClient, bytes, true, opCode == GatewayOpCode.Heartbeat, options)).ConfigureAwait(false); await _sentGatewayMessageEvent.InvokeAsync(opCode).ConfigureAwait(false); -#if DEBUG - Console.WriteLine($"Sent {opCode}:\n{SerializeJson(payload)}"); +#if DEBUG_PACKETS + Console.WriteLine($"-> {opCode}:\n{SerializeJson(payload)}"); #endif }