Skip to content

Commit

Permalink
Can't delete messages in dms
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnsAnns committed Jul 27, 2023
1 parent d7cb95f commit 600062b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ impl EventHandler for Handler {
println!("Error sending message: {:?}", why);
};

// Delete message
if let Err(why) = msg.delete(&context.http).await {
println!("Error deleting message: {:?}", why);
if !msg.is_private() {
// Delete message
if let Err(why) = msg.delete(&context.http).await {
println!("Error deleting message: {:?}", why);
}
}
}

Expand Down

0 comments on commit 600062b

Please sign in to comment.