Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

212
Views
Discord Bot Cannot Find Module './Commands/balance.js'

---command_handler.js---

const fs = require('fs');

module.exports = (client, Discord) =>{

const command_files = fs.readdirSync('./Commands/').filter(file => file.endsWith('.js'))

for(const file of command_files){

    const command = require(`./Commands/${file}`);

    if(command.name){

        client.commands.set(command.name, command);

    } else {

        continue;
        }
    }
}

---balance.js---

module.exports = {
    name: 'balance',
    aliases: ["bal", "bl"],
    permissions: [],
    description: "Check the user balance",
    async execute(message, args, cmd, client, discord, profileData){
    message.channel.send(`Your wwallet balance is ${profileData.coins}, your monke balance is ${profileData.monke}`);
    }
}

My error message is

Error: Cannot find module './Commands/balance.js'

I don't no why this is happening. Please help

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!