Skip to content

Commit

Permalink
Fix signature of execute_modal_on_component_interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev committed Nov 30, 2023
1 parent bcd8958 commit cc068bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/feature_showcase/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub async fn component_modal(ctx: crate::Context<'_>) -> Result<(), Error> {

ctx.send(reply).await?;

while let Some(mci) = serenity::ModalInteractionCollector::new(ctx.serenity_context())
while let Some(mci) = serenity::ComponentInteractionCollector::new(ctx.serenity_context())
.timeout(std::time::Duration::from_secs(120))
.filter(move |mci| mci.data.custom_id == "open_modal")
.await
Expand Down
2 changes: 1 addition & 1 deletion src/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub async fn execute_modal<U: Send + Sync, E, M: Modal>(
/// and adjust to your needs. The code of this function is just a starting point.
pub async fn execute_modal_on_component_interaction<M: Modal>(
ctx: impl AsRef<serenity::Context>,
interaction: serenity::ModalInteraction,
interaction: serenity::ComponentInteraction,
defaults: Option<M>,
timeout: Option<std::time::Duration>,
) -> Result<Option<M>, serenity::Error> {
Expand Down

0 comments on commit cc068bf

Please sign in to comment.