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