mirror of
https://github.com/revanced/revanced-discord-bot.git
synced 2025-05-02 07:24: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()
|
.iter()
|
||||||
.any(|&channel| channel == current_channel);
|
.any(|&channel| channel == current_channel);
|
||||||
|
|
||||||
if !configuration
|
if is_media_channel
|
||||||
.administrators
|
&& (new_message.attachments.is_empty()
|
||||||
.users
|
|| !configuration
|
||||||
.contains(&new_message.author.id.0)
|
.administrators
|
||||||
&& is_media_channel
|
.users
|
||||||
&& !new_message.attachments.is_empty()
|
.contains(&new_message.author.id.0))
|
||||||
{
|
{
|
||||||
if let Err(why) = new_message.delete(&ctx.http).await {
|
if let Err(why) = new_message.delete(&ctx.http).await {
|
||||||
error!("Error deleting message: {:?}", why);
|
error!("Error deleting message: {:?}", why);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user