From eb4c29102504efba530e699ed500ee265c857f1d Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 21 Jun 2025 02:47:26 +0500 Subject: feat: document and animation files support --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index f780d19..d5f4d0e 100644 --- a/main.py +++ b/main.py @@ -65,6 +65,10 @@ async def download_file(update: Update, _: CallbackContext) -> 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) + elif update.message.animation is not None: + file_path = await download_locally_file(update, update.message.animation) + elif update.message.document is not None: + file_path = await download_locally_file(update, update.message.document) if file_path is not None: try: @@ -81,7 +85,8 @@ def run(): app = ApplicationBuilder().token("xd").build() app.add_handler(MessageHandler( filters.PHOTO | filters.VIDEO | filters.VIDEO_NOTE | - filters.VOICE | filters.AUDIO, + filters.VOICE | filters.AUDIO | filters.ANIMATION | + filters.Document.ALL, download_file )) app.run_polling() -- cgit v1.2.3