Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,6 @@ public static Task<Model> ModifyAsync(ulong channelId, ulong msgId, BaseDiscordC
var embed = args.Embed;
var embeds = args.Embeds;

bool hasText = args.Content.IsSpecified && !string.IsNullOrEmpty(args.Content.Value);
bool hasEmbeds = embed is { IsSpecified: true, Value: not null }
|| embeds is { IsSpecified: true, Value.Length: > 0 };
bool hasComponents = args.Components is { IsSpecified: true, Value: not null };
bool hasAttachments = args.Attachments.IsSpecified;
bool hasFlags = args.Flags.IsSpecified;

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

if (args.AllowedMentions.IsSpecified)
{
var allowedMentions = args.AllowedMentions.Value;
Expand Down