From dea03ea8467cb20b53f1823b31f94f8f489da888 Mon Sep 17 00:00:00 2001 From: thedragonsinn <98635854+thedragonsinn@users.noreply.github.com> Date: Wed, 1 May 2024 20:07:40 +0530 Subject: [PATCH] song.py: use more exts for check --- app/plugins/misc/song.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/plugins/misc/song.py b/app/plugins/misc/song.py index 466bdd7..a0e84de 100644 --- a/app/plugins/misc/song.py +++ b/app/plugins/misc/song.py @@ -6,7 +6,7 @@ import shutil from time import time from urllib.parse import urlparse -from ub_core.utils import aio, run_shell_cmd +from ub_core.utils import MediaExts, aio, run_shell_cmd from app import BOT, Message, bot @@ -59,7 +59,7 @@ async def song_dl(bot: BOT, message: Message) -> None | Message: await response.edit("Uploading....") for audio_file in down_path: - if audio_file.endswith((".opus", ".mp3")): + if audio_file.endswith(tuple(MediaExts.AUDIO)): await message.reply_audio( audio=audio_file, duration=int(duration),