diff --git a/src/dispatch/mod.rs b/src/dispatch/mod.rs index 23005855af84..53dd8d7b7afa 100644 --- a/src/dispatch/mod.rs +++ b/src/dispatch/mod.rs @@ -125,7 +125,7 @@ pub async fn dispatch_event( .unwrap() .process_message_delete(*deleted_message_id); if let Some(bot_response) = bot_response { - if let Err(e) = bot_response.delete(framework.serenity_context, None).await { + if let Err(e) = bot_response.delete(&framework.serenity_context.http, None).await { tracing::warn!("failed to delete bot response: {}", e); } } diff --git a/src/reply/mod.rs b/src/reply/mod.rs index 576f93ab207c..d85512cb942e 100644 --- a/src/reply/mod.rs +++ b/src/reply/mod.rs @@ -144,7 +144,7 @@ impl ReplyHandle<'_> { ctx: crate::Context<'_, U, E>, ) -> Result<(), serenity::Error> { match &self.0 { - ReplyHandleInner::Prefix(msg) => msg.delete(ctx.serenity_context(), None).await?, + ReplyHandleInner::Prefix(msg) => msg.delete(ctx.http(), None).await?, ReplyHandleInner::Application { http: _, interaction, diff --git a/src/reply/send_reply.rs b/src/reply/send_reply.rs index b127f908938d..12d6af47330c 100644 --- a/src/reply/send_reply.rs +++ b/src/reply/send_reply.rs @@ -154,7 +154,7 @@ pub async fn send_prefix_reply<'a, U: Send + Sync + 'static, E>( let new_response = ctx .msg .channel_id - .send_message(ctx.serenity_context(), builder.to_prefix(ctx.msg.into())) + .send_message(ctx.http(), builder.to_prefix(ctx.msg.into())) .await?; // We don't check ctx.command.reuse_response because we need to store bot responses for // track_deletion too