summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py7
1 files changed, 6 insertions, 1 deletions
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()