From 48d4204e0e36900ef5801e70e845132e9e1f6b6a Mon Sep 17 00:00:00 2001 From: vaaski Date: Tue, 7 May 2024 14:14:05 +0200 Subject: [PATCH] add duration to telegram response --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 23eb641..f4878f9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -83,6 +83,7 @@ bot.on("message:text").on("::url", async (ctx, next) => { await ctx.replyWithVideo(video, { caption: title, supports_streaming: true, + duration: info.duration, reply_parameters: { message_id: ctx.message?.message_id, allow_sending_without_reply: true, @@ -97,6 +98,7 @@ bot.on("message:text").on("::url", async (ctx, next) => { performer: info.uploader, title: info.title, thumbnail: getThumbnail(info.thumbnails), + duration: info.duration, reply_parameters: { message_id: ctx.message?.message_id, allow_sending_without_reply: true,