Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Can't use the SuppressNotification flag with webhooks #2971

Closed
3 tasks done
mujurin1 opened this issue Jul 30, 2024 · 0 comments · Fixed by #3007
Closed
3 tasks done

[Bug]: Can't use the SuppressNotification flag with webhooks #2971

mujurin1 opened this issue Jul 30, 2024 · 0 comments · Fixed by #3007
Assignees
Labels

Comments

@mujurin1
Copy link

Check The Docs

  • I double checked the docs and couldn't find any useful information.

Verify Issue Source

  • I verified the issue was caused by Discord.Net.

Check your intents

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants