Skip to content

Commit

Permalink
Allow setting SuppressNotification in webhook client(#3007)
Browse files Browse the repository at this point in the history
  • Loading branch information
Misha-133 authored Sep 14, 2024
1 parent 292f8c4 commit 682d87e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Discord.Net.Webhook/WebhookClientHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public static async Task<ulong> SendMessageAsync(DiscordWebhookClient client,
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;
Expand Down

0 comments on commit 682d87e

Please sign in to comment.