summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-06-21 02:47:26 +0500
committerilotterytea <iltsu@alright.party>2025-06-21 02:47:26 +0500
commiteb4c29102504efba530e699ed500ee265c857f1d (patch)
treeaf5bf3e8fbcb8e4472bb1c4c060cfa5b55c2c1af
parentb4283cf367b46cb74965c5053b6bb23f58baa2a9 (diff)
feat: document and animation files support
-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()