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

note that deferred callback can only have ephemeral as flag #7386

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lulalaby
Copy link
Contributor

@Lulalaby Lulalaby commented Feb 10, 2025

I believe this is not noted anywhere.

Trying to set the suppress notification flag and the ephemeral flags while deferring ends up being filtered to just the ephemeral flag.

Tested with:

[SlashCommand("test", "Testing")]
public static async Task TestAsync(InteractionContext ctx)
{
        var builder = new DiscordInteractionResponseBuilder().AsEphemeral().AsSilentMessage().SuppressEmbeds().WithV2Components();
        var response = await ctx.CreateResponseAsync(InteractionResponseType.DeferredChannelMessageWithSource, builder);
        await ctx.EditResponseAsync($"Send the following flags: {response.SendFlags}\nReceived the following flags from the callback response: {response.Message?.Flags}");
}

image

@Lulalaby Lulalaby requested a review from a team as a code owner February 10, 2025 23:45
@Lulalaby Lulalaby requested review from shaydewael and removed request for a team February 10, 2025 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant