mirror of
https://github.com/revanced/revanced-discord-bot.git
synced 2025-05-04 00:04:25 +02:00
fix(media-channel): check if message contains attachment
This commit is contained in:
parent
db83c1f85b
commit
fd8ca4215d
@ -24,6 +24,7 @@ pub async fn handle_media_channel(
|
|||||||
.users
|
.users
|
||||||
.contains(&new_message.author.id.0)
|
.contains(&new_message.author.id.0)
|
||||||
&& is_media_channel
|
&& is_media_channel
|
||||||
|
&& !new_message.attachments.is_empty()
|
||||||
{
|
{
|
||||||
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