XQC
DIAdiscord.js - Imagine an app
•Created by XQC on 7/25/2023 in #djs-questions
Auto remove file
There is my code but bot send files but not delete.
setTimeout(() => {
try {
filesToSend.forEach((file) => {
fs.unlinkSync(path.join(sourcePath, file));
});
fs.rmdirSync(sourcePath);
} catch (error) {
console.error('Dosya silme hatası:', error);
}
}, 10000);
4 replies