So I downloaded some files for an old discord bot I used to work on a while back and after installing everything the terminal gives an error when I try to run the bot.
So I reinstalled node.js and the issue is still persisting. I get this error when I try to run it
Error: Cannot find module ‘C:UsersUserDownloadsBot-20221216T012954Z-001index.js’
If it helps I had to manually create an environment variable for node.js so maybe I messed something up there?
I’ll put the start of the index file below.
const Discord = require('discord.js');
const keep_alive = require('./keep_alive.js')
const db = require('quick.db');
const client = new Discord.Client();
const ms = require('parse-ms');
const cooldown = new Set();
const fs = require('fs');
client.commands = new Discord.Collection();
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
for (const file of commandFiles){
const command = require(`./commands/${file}`);
client.commands.set(command.name, command);
}
Thanks in advance.