From 2714c748bf9a7712801756b2e01bbec9e9f6cbb3 Mon Sep 17 00:00:00 2001 From: Supositware Date: Wed, 28 Sep 2022 16:00:59 +0200 Subject: [PATCH] Copy instead of moving the file --- commands/utility/addytp.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/utility/addytp.js b/commands/utility/addytp.js index b31544e8..bd75c018 100644 --- a/commands/utility/addytp.js +++ b/commands/utility/addytp.js @@ -36,7 +36,8 @@ export default { await interaction.editReply({ content: '❌ Uh oh! The video is too big!', ephemeral: true }); } else { - fs.renameSync(output, `./asset/ytp/userVid/${file}`); + // CopyFile instead of rename in case you have /tmp and the asset folder on different a disk. + fs.copyFileSync(output, `./asset/ytp/userVid/${file}`); const mp4 = []; fs.readdirSync('./asset/ytp/userVid/').forEach(f => { if (f.endsWith('mp4')) {