Discord.Net
Discord.Net copied to clipboard
[Bug]: Can't use the SuppressNotification flag with webhooks
Check The Docs
- [X] I double checked the docs and couldn't find any useful information.
Verify Issue Source
- [X] I verified the issue was caused by Discord.Net.
Check your intents
- [X] I double checked that I have the required intents.
Description
Can't use the SuppressNotification flag with webhooks. This flag is actually available for webhooks.
Version
3.15.3
Working Version
No response
Logs
Unhandled exception. System.ArgumentException: The only valid MessageFlags are SuppressEmbeds and none. (Parameter 'flags')
at Discord.Webhook.WebhookClientHelper.SendMessageAsync(DiscordWebhookClient client, String text, Boolean isTTS, IEnumerable`1 embeds, String username, String avatarUrl, AllowedMentions allowedMentions, RequestOptions options, MessageComponent components, MessageFlags flags, Nullable`1 threadId, String threadName, UInt64[] appliedTags, PollProperties poll)
at Program.<Main>$(String[] args) in D:\Programing\ConsoleApp\Program.cs:line 7
at Program.<Main>(String[] args)
Sample
var client = new DiscordWebhookClient(url);
await client.SendMessageAsync(
"message",
flags: MessageFlags.SuppressNotification
);
Packages
Discord.Net.Webhook Version:3.15.3
Environment
Irrelevant.