This commit is contained in:
loicbersier 2020-03-06 15:14:27 +01:00
parent c4f4a2a995
commit 183b01f5f0

View file

@ -88,6 +88,8 @@ class DownloadCommand extends Command {
fs.renameSync(`${os.tmpdir()}/${fileName}`, `${os.tmpdir()}/${fileName}.${ext}`);
} else if (fs.existsSync(`${os.tmpdir()}/${fileName}.mkv`)) { // If it can't find the video assume it got merged and end with mkv
fs.renameSync(`${os.tmpdir()}/${fileName}.mkv`, `${os.tmpdir()}/${fileName}.mp4`); // Discord play mkv just fine but it need to end with mp4
} else if (fs.existsSync(`${os.tmpdir()}/${fileName}.webm`)) { // Same as mkv
ext = 'webm';
}
let file = fs.statSync(`${os.tmpdir()}/${fileName}.${ext}`);