From fcfd8ddfba33b94b31e9214b2ab65b7161d4eecd Mon Sep 17 00:00:00 2001 From: Brendan McShane Date: Fri, 7 Jan 2022 16:20:16 -0500 Subject: [PATCH] Fix issue with Argument cannot be blank when modifying flags --- src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs b/src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs index 309500c96..c5334980b 100644 --- a/src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs +++ b/src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs @@ -43,8 +43,11 @@ namespace Discord.Rest bool hasComponents = args.Components.IsSpecified && args.Components.Value != null; bool hasAttachments = args.Attachments.IsSpecified; - if (!hasComponents && !hasText && !hasEmbeds && !hasAttachments) + // No content needed if modifying flags + if ((!hasComponents && !hasText && !hasEmbeds && !hasAttachments) && !args.Flags.IsSpecified) + { Preconditions.NotNullOrEmpty(args.Content.IsSpecified ? args.Content.Value : string.Empty, nameof(args.Content)); + } if (args.AllowedMentions.IsSpecified) {