conf: delete video from server
This commit is contained in:
parent
9e2c1104ba
commit
452aed5fd3
1 changed files with 12 additions and 6 deletions
|
@ -1,4 +1,5 @@
|
|||
var exec = require('child_process').exec;
|
||||
const fs = require('fs');
|
||||
|
||||
async function DownloadFromYoutube(command) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
@ -23,6 +24,11 @@ module.exports = (bot) => {
|
|||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
try {
|
||||
fs.unlinkSync('video.mp4');
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue