Skip to content

Commit e3eb0a9

Browse files
authored
Fix ModifyAsync (#2023)
* Fix issue with Argument cannot be blank when modifying flags * Make uniform with existing code
1 parent 944a0de commit e3eb0a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ public static async Task<Model> ModifyAsync(ulong channelId, ulong msgId, BaseDi
4242
bool hasEmbeds = embed.IsSpecified && embed.Value != null || embeds.IsSpecified && embeds.Value?.Length > 0;
4343
bool hasComponents = args.Components.IsSpecified && args.Components.Value != null;
4444
bool hasAttachments = args.Attachments.IsSpecified;
45+
bool hasFlags = args.Flags.IsSpecified;
4546

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

4951
if (args.AllowedMentions.IsSpecified)

0 commit comments

Comments
 (0)