Skip to content

Commit

Permalink
fix(media-channel): change order of condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Oct 24, 2022
1 parent 24a084f commit fdf1dca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/utils/media_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ pub async fn handle_media_channel(
.iter()
.any(|&channel| channel == current_channel);

if !configuration
.administrators
.users
.contains(&new_message.author.id.0)
&& is_media_channel
&& !new_message.attachments.is_empty()
if is_media_channel
&& (new_message.attachments.is_empty()
|| !configuration
.administrators
.users
.contains(&new_message.author.id.0))
{
if let Err(why) = new_message.delete(&ctx.http).await {
error!("Error deleting message: {:?}", why);
Expand Down

0 comments on commit fdf1dca

Please sign in to comment.