Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
fix(media-channel): check if message contains attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Oct 23, 2022
1 parent db83c1f commit fd8ca42
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/media_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fd8ca42

Please sign in to comment.