summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-06-21 02:41:39 +0500
committerilotterytea <iltsu@alright.party>2025-06-21 02:41:39 +0500
commitb4283cf367b46cb74965c5053b6bb23f58baa2a9 (patch)
tree42954d31bc6815a30381403d8827ff4ddce9ce12
parent3b13c63ba308b1cb4b214316e48c7cc644829a74 (diff)
feat: audio files support
-rw-r--r--main.py4
1 files changed, 3 insertions, 1 deletions
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()