From fd8ca4215d9f3eac964e5b7202f7140632ed1e13 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 23 Oct 2022 05:15:09 +0200 Subject: [PATCH] fix(media-channel): check if message contains attachment --- src/utils/media_channel.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/media_channel.rs b/src/utils/media_channel.rs index 90d28cd..d400684 100644 --- a/src/utils/media_channel.rs +++ b/src/utils/media_channel.rs @@ -24,6 +24,7 @@ pub async fn handle_media_channel( .users .contains(&new_message.author.id.0) && is_media_channel + && !new_message.attachments.is_empty() { if let Err(why) = new_message.delete(&ctx.http).await { error!("Error deleting message: {:?}", why);