Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

148
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda