From 682d87e62b37f7c2f257a86e99d600fab44d4991 Mon Sep 17 00:00:00 2001 From: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com> Date: Sat, 14 Sep 2024 19:42:58 +0300 Subject: [PATCH] Allow setting SuppressNotification in webhook client(#3007) --- src/Discord.Net.Webhook/WebhookClientHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Discord.Net.Webhook/WebhookClientHelper.cs b/src/Discord.Net.Webhook/WebhookClientHelper.cs index 0d3daeb7..47db9a21 100644 --- a/src/Discord.Net.Webhook/WebhookClientHelper.cs +++ b/src/Discord.Net.Webhook/WebhookClientHelper.cs @@ -56,8 +56,8 @@ namespace Discord.Webhook if (poll != null) args.Poll = poll.ToModel(); - if (flags is not MessageFlags.None and not MessageFlags.SuppressEmbeds) - throw new ArgumentException("The only valid MessageFlags are SuppressEmbeds and none.", nameof(flags)); + if (flags is not MessageFlags.None and not MessageFlags.SuppressEmbeds and not MessageFlags.SuppressNotification) + throw new ArgumentException("The only valid MessageFlags are SuppressEmbeds, SuppressNotification and none.", nameof(flags)); var model = await client.ApiClient.CreateWebhookMessageAsync(client.Webhook.Id, args, options: options, threadId: threadId).ConfigureAwait(false); return model.Id;