fix(media-channel): check if message contains attachment

This commit is contained in:
oSumAtrIX 2022-10-23 05:15:09 +02:00
parent db83c1f85b
commit fd8ca4215d
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -24,6 +24,7 @@ pub async fn handle_media_channel(
.users
.contains(&new_message.author.id.0)
&& is_media_channel
&& !new_message.attachments.is_empty()
{
if let Err(why) = new_message.delete(&ctx.http).await {
error!("Error deleting message: {:?}", why);