Browse Source

Make uniform with existing code

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

+ 2
- 3
src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs View File

@@ -42,12 +42,11 @@ namespace Discord.Rest
bool hasEmbeds = embed.IsSpecified && embed.Value != null || embeds.IsSpecified && embeds.Value?.Length > 0;
bool hasComponents = args.Components.IsSpecified && args.Components.Value != null;
bool hasAttachments = args.Attachments.IsSpecified;
bool hasFlags = args.Flags.IsSpecified;

// No content needed if modifying flags
if ((!hasComponents && !hasText && !hasEmbeds && !hasAttachments) && !args.Flags.IsSpecified)
{
if ((!hasComponents && !hasText && !hasEmbeds && !hasAttachments) && !hasFlags)
Preconditions.NotNullOrEmpty(args.Content.IsSpecified ? args.Content.Value : string.Empty, nameof(args.Content));
}

if (args.AllowedMentions.IsSpecified)
{


Loading…
Cancel
Save