Delete part files too
This commit is contained in:
parent
a25d1202b1
commit
4752e52480
12
index.js
12
index.js
|
@ -24,6 +24,18 @@ fs.readdir(tmpDir, (err, files) => {
|
|||
}
|
||||
});
|
||||
|
||||
fs.readdir(tmpDir, (err, files) => {
|
||||
if (err) throw err;
|
||||
|
||||
for (const file of files) {
|
||||
if (file.endsWith('.part')) {
|
||||
fs.unlink(path.join(tmpDir, file), err => {
|
||||
if (err) throw err;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const commandFiles = fs.readdirSync(path.join(__dirname, 'commands')).filter(file => file.endsWith('.js'));
|
||||
for (const file of commandFiles) {
|
||||
const command = require(`./commands/${file}`);
|
||||
|
|
Loading…
Reference in New Issue