Add chat action responses for video and image uploads in Telegram bot; enhance user experience during media processing.

This commit is contained in:
vchikalkin 2025-08-14 13:47:09 +03:00
parent bdaff801e4
commit 8225bbe546

View File

@ -38,10 +38,12 @@ bot.on('message:text', async (ctx) => {
}
if (result?.type === 'video' && videoUrl) {
await ctx.replyWithChatAction('upload_video');
return ctx.replyWithVideo(new InputFile({ url: videoUrl }));
}
if (result?.type === 'image' && imagesUrls) {
await ctx.replyWithChatAction('upload_photo');
return ctx.replyWithMediaGroup(imagesUrls.map((image) => ({ media: image, type: 'photo' })));
}
} catch (error) {