Compare commits

..

No commits in common. "f4ffcbebde9f0696a7f29b88378f49b2e3a619f2" and "27fc1c55bf7043e33a28fc6b6d453c5060163fe3" have entirely different histories.

View file

@ -9,7 +9,8 @@ module.exports = {
"Usage: <prefix>dl <url>"
],
async execute({message, args}) {
const downloadsDir = path.resolve(process.cwd(), 'data', 'downloads', Date.now().toString());
const downloadsDir = path.resolve(process.cwd(), 'data', 'downloads', Math.floor(new Date).toString());
const cookieFilepath = path.resolve(process.cwd(), 'data', 'cookies.txt')
if(!fs.existsSync(cookieFilepath)) {
message.channel.send("Some dependencies are needed for the command to work properly. Please let the bot's owner know.")
@ -45,7 +46,7 @@ module.exports = {
let files = fs.readdirSync(downloadsDir);
if(files.length < 1) {
if(files < 1) {
this.cleanUp(downloadsDir);
originalMessage.edit("Something went wrong when downloading the video.")
return;