Skip to content

Commit

Permalink
Use Http instead of CacheHttp
Browse files Browse the repository at this point in the history
  • Loading branch information
NotNorom committed May 2, 2024
1 parent 57abf8f commit b95a365
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/dispatch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub async fn dispatch_event<U: Send + Sync + 'static, E>(
.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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/reply/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/reply/send_reply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b95a365

Please sign in to comment.