fixed ephemeral message flagging
This commit is contained in:
parent
0eec30fe82
commit
980db8afff
1 changed files with 6 additions and 4 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -220,10 +220,11 @@ pub async fn roll(ctx: &Context, command: &CommandInteraction) -> anyhow::Result
|
||||||
.components(vec![CreateComponent::Container(CreateContainer::new(
|
.components(vec![CreateComponent::Container(CreateContainer::new(
|
||||||
text_components,
|
text_components,
|
||||||
))])
|
))])
|
||||||
.ephemeral(private)
|
// flags needs to be called before ephemeral for correct ordering
|
||||||
.flags(
|
.flags(
|
||||||
MessageFlags::IS_COMPONENTS_V2 | MessageFlags::SUPPRESS_NOTIFICATIONS,
|
MessageFlags::IS_COMPONENTS_V2 | MessageFlags::SUPPRESS_NOTIFICATIONS,
|
||||||
),
|
)
|
||||||
|
.ephemeral(private),
|
||||||
);
|
);
|
||||||
|
|
||||||
debug!("Returning response: {response:#?}");
|
debug!("Returning response: {response:#?}");
|
||||||
|
|
@ -250,10 +251,11 @@ pub async fn roll(ctx: &Context, command: &CommandInteraction) -> anyhow::Result
|
||||||
CreateTextDisplay::new(err.to_string()),
|
CreateTextDisplay::new(err.to_string()),
|
||||||
)],
|
)],
|
||||||
))])
|
))])
|
||||||
.ephemeral(true)
|
// flags needs to be called before ephemeral for correct ordering
|
||||||
.flags(
|
.flags(
|
||||||
MessageFlags::IS_COMPONENTS_V2 | MessageFlags::SUPPRESS_NOTIFICATIONS,
|
MessageFlags::IS_COMPONENTS_V2 | MessageFlags::SUPPRESS_NOTIFICATIONS,
|
||||||
),
|
)
|
||||||
|
.ephemeral(true),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.await?
|
.await?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue