From 980db8affffc675fae0dd2de538761b32ae7f7a0 Mon Sep 17 00:00:00 2001 From: Lilith Schier Date: Thu, 20 Aug 2026 18:09:32 +0200 Subject: [PATCH] fixed ephemeral message flagging --- src/main.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8b34858..dc7ad18 100644 --- a/src/main.rs +++ b/src/main.rs @@ -220,10 +220,11 @@ pub async fn roll(ctx: &Context, command: &CommandInteraction) -> anyhow::Result .components(vec![CreateComponent::Container(CreateContainer::new( text_components, ))]) - .ephemeral(private) + // flags needs to be called before ephemeral for correct ordering .flags( MessageFlags::IS_COMPONENTS_V2 | MessageFlags::SUPPRESS_NOTIFICATIONS, - ), + ) + .ephemeral(private), ); debug!("Returning response: {response:#?}"); @@ -250,10 +251,11 @@ pub async fn roll(ctx: &Context, command: &CommandInteraction) -> anyhow::Result CreateTextDisplay::new(err.to_string()), )], ))]) - .ephemeral(true) + // flags needs to be called before ephemeral for correct ordering .flags( MessageFlags::IS_COMPONENTS_V2 | MessageFlags::SUPPRESS_NOTIFICATIONS, - ), + ) + .ephemeral(true), ), ) .await?