Use Date.now()
All checks were successful
CI / CI (push) Successful in 1m25s

This commit is contained in:
SileNce5k 2025-06-21 13:55:18 +02:00
parent 2073a46715
commit f4ffcbebde
Signed by: SileNce
GPG key ID: B0A142BB4291B204

View file

@ -9,8 +9,7 @@ module.exports = {
"Usage: <prefix>dl <url>" "Usage: <prefix>dl <url>"
], ],
async execute({message, args}) { 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') const cookieFilepath = path.resolve(process.cwd(), 'data', 'cookies.txt')
if(!fs.existsSync(cookieFilepath)) { if(!fs.existsSync(cookieFilepath)) {
message.channel.send("Some dependencies are needed for the command to work properly. Please let the bot's owner know.") message.channel.send("Some dependencies are needed for the command to work properly. Please let the bot's owner know.")