From bc0ff3f28281610be3e6f95df259fac8111552b0 Mon Sep 17 00:00:00 2001 From: quin lynch Date: Thu, 2 Sep 2021 12:10:24 -0300 Subject: [PATCH] Fix UpdateAsync with null components doesnt clear components --- .../Interaction/Message Components/SocketMessageComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs b/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs index cc91b098f..f427513ff 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs @@ -199,7 +199,7 @@ namespace Discord.WebSocket AllowedMentions = args.AllowedMentions.IsSpecified ? args.AllowedMentions.Value?.ToModel() : Optional.Unspecified, Embeds = apiEmbeds?.ToArray() ?? Optional.Unspecified, Components = args.Components.IsSpecified - ? args.Components.Value?.Components.Select(x => new API.ActionRowComponent(x)).ToArray() + ? args.Components.Value?.Components.Select(x => new API.ActionRowComponent(x)).ToArray() ?? new API.ActionRowComponent[0] : Optional.Unspecified, Flags = args.Flags.IsSpecified ? args.Flags.Value ?? Optional.Unspecified : Optional.Unspecified }