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

146
Views
add points to user via json
if(message.content.startsWith(prefix + "addpoints")) {

        let pUser = args[1];

        if (!points[pUser.id]) points[pUser.id] = {
            points: 0
        };

        const addition = parseInt(args[1])

        //const fpoints = points[pUser.id] + addition

        points[pUser.id].points++;

        fs.writeFile("./points.json", JSON.stringify(points), (err) => {
            if (err) logchannel.send({ embeds: [errorembed] })
            console.log(err)
        });

        
    }

Hi i want to make a system that gives user points for example if he behaves good. Then i want to have the option to give him points and save that in a json file. I hope this helps

Please also answer with the right place to put the code in thanks

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!