mirror of
https://github.com/revanced/revanced-discord-bot.git
synced 2025-05-01 23:14:25 +02:00
fix(media-channel): change order of condition check
This commit is contained in:
parent
24a084fd1d
commit
fdf1dca2a1
@ -19,12 +19,12 @@ pub async fn handle_media_channel(
|
||||
.iter()
|
||||
.any(|&channel| channel == current_channel);
|
||||
|
||||
if !configuration
|
||||
if is_media_channel
|
||||
&& (new_message.attachments.is_empty()
|
||||
|| !configuration
|
||||
.administrators
|
||||
.users
|
||||
.contains(&new_message.author.id.0)
|
||||
&& is_media_channel
|
||||
&& !new_message.attachments.is_empty()
|
||||
.contains(&new_message.author.id.0))
|
||||
{
|
||||
if let Err(why) = new_message.delete(&ctx.http).await {
|
||||
error!("Error deleting message: {:?}", why);
|
||||
|
Loading…
x
Reference in New Issue
Block a user