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