Skip to content

Commit

Permalink
Clear emoji and don't ping on edit because it looks uncool >:(
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnsAnns committed Jul 27, 2023
1 parent 5e3b09a commit 2769ac9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,19 @@ impl EventHandler for Handler {

// This is required to fix a potential caching issue with embeds
msg.embeds.clear();

if let Err(why) = msg.edit(&ctx.http, |m| m.content(new_msg)).await {

if let Err(why) = msg
.edit(&ctx.http, |m| {
m.content(new_msg).allowed_mentions(|am| am.empty_parse())
})
.await
{
println!("Error changing message: {:?}", why);
}

if let Err(why) = add_reaction.delete(&ctx.http).await {
println!("Error clearing reaction: {:?}", why);
}
}
}

Expand Down

0 comments on commit 2769ac9

Please sign in to comment.