diff options
| author | ilotterytea <iltsu@alright.party> | 2025-06-21 02:47:26 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-06-21 02:47:26 +0500 |
| commit | eb4c29102504efba530e699ed500ee265c857f1d (patch) | |
| tree | af5bf3e8fbcb8e4472bb1c4c060cfa5b55c2c1af | |
| parent | b4283cf367b46cb74965c5053b6bb23f58baa2a9 (diff) | |
feat: document and animation files support
| -rw-r--r-- | main.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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() |
