fix(media-channel): change order of condition check

This commit is contained in:
oSumAtrIX 2022-10-24 19:07:18 +02:00
parent 24a084fd1d
commit fdf1dca2a1
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -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);