From ef258e0c15a0e8c03686222556215dc4581ed04c Mon Sep 17 00:00:00 2001 From: GiovaniFZ Date: Sat, 19 Oct 2024 12:49:56 -0300 Subject: [PATCH] is it having access to ffmpeg? --- commands/youtube.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/youtube.js b/commands/youtube.js index 797d2fa..a31a9dd 100644 --- a/commands/youtube.js +++ b/commands/youtube.js @@ -86,7 +86,9 @@ module.exports = (bot) => { }, ); - const dlpArgs = [videoUrl, videoFormat, ...cmdArgs.split(' '), mp4File]; + const ffmpegArgs = '&& which ffmpeg'; + + const dlpArgs = [videoUrl, videoFormat, ...cmdArgs.split(' '), mp4File, ffmpegArgs]; await downloadFromYoutube(dlpCommand, dlpArgs); await ctx.telegram.editMessageText( @@ -99,6 +101,8 @@ module.exports = (bot) => { }, ); + if(fs.existsSync) + if (fs.existsSync(mp4File)) { const message = strings.ytUploadDesc .replace("{userId}", userId)