From b4283cf367b46cb74965c5053b6bb23f58baa2a9 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 21 Jun 2025 02:41:39 +0500 Subject: feat: audio files support --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main.py') diff --git a/main.py b/main.py index 0c9cddb..f780d19 100644 --- a/main.py +++ b/main.py @@ -63,6 +63,8 @@ async def download_file(update: Update, _: CallbackContext) -> None: file_path = await download_locally_file(update, update.message.video_note) elif update.message.voice is not None: file_path = await download_locally_file(update, update.message.voice) + elif update.message.audio is not None: + file_path = await download_locally_file(update, update.message.audio) if file_path is not None: try: @@ -79,7 +81,7 @@ def run(): app = ApplicationBuilder().token("xd").build() app.add_handler(MessageHandler( filters.PHOTO | filters.VIDEO | filters.VIDEO_NOTE | - filters.VOICE, + filters.VOICE | filters.AUDIO, download_file )) app.run_polling() -- cgit v1.2.3