Skip to content

Commit

Permalink
Fix defer_ephemeral for modals (#2347)
Browse files Browse the repository at this point in the history
Deferring an interaction ephemerally should be done using
`DeferredChannelMessageWithSource`. 

Modals support using `DeferredUpdateMessage`, but this is undocumented.
  • Loading branch information
mkrasnitski authored Feb 28, 2023
1 parent 5650901 commit da4d9db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/model/application/interaction/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ impl ModalSubmitInteraction {
/// API response.
pub async fn defer_ephemeral(&self, http: impl AsRef<Http>) -> Result<()> {
self.create_interaction_response(http, |f| {
f.kind(InteractionResponseType::DeferredUpdateMessage)
f.kind(InteractionResponseType::DeferredChannelMessageWithSource)
.interaction_response_data(|f| f.ephemeral(true))
})
.await
Expand Down

0 comments on commit da4d9db

Please sign in to comment.