summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-06-21 02:34:58 +0500
committerilotterytea <iltsu@alright.party>2025-06-21 02:34:58 +0500
commit569cb9b1f91799056d0f1c6fdfb64887f7ee6d60 (patch)
treef1addd984d44ae7a44c52deb3509fbe0e900fe44
parentae374c0405716e1e92f79611f631e9e604adf344 (diff)
feat: video note support
-rw-r--r--main.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.py b/main.py
index dd5ca7e..acaeedc 100644
--- a/main.py
+++ b/main.py
@@ -59,6 +59,8 @@ async def download_file(update: Update, _: CallbackContext) -> None:
file_path = await download_locally_file(update, update.message.photo[-1])
elif update.message.video is not None:
file_path = await download_locally_file(update, update.message.video)
+ elif update.message.video_note is not None:
+ file_path = await download_locally_file(update, update.message.video_note)
if file_path is not None:
try:
@@ -73,7 +75,7 @@ async def download_file(update: Update, _: CallbackContext) -> None:
def run():
print("Starting the bot...")
app = ApplicationBuilder().token("xd").build()
- app.add_handler(MessageHandler(filters.PHOTO | filters.VIDEO, download_file))
+ app.add_handler(MessageHandler(filters.PHOTO | filters.VIDEO | filters.VIDEO_NOTE, download_file))
app.run_polling()