Browse Source

Fix issue with Argument cannot be blank when modifying flags

pull/2023/head
Brendan McShane 3 years ago
parent
commit
fcfd8ddfba
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs

+ 4
- 1
src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs View File

@@ -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)
{


Loading…
Cancel
Save