Allow setting SuppressNotification in webhook client(#3007)

This commit is contained in:
Mihail Gribkov
2024-09-14 19:42:58 +03:00
committed by GitHub
parent 292f8c40eb
commit 682d87e62b

View File

@@ -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;