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

256
Vistas
How to make discord bot calc with javascript?

I'm new to this ,i am looking for simple mathematics command on discord.js im building a simple bot for myself .I want him to calc simple task like : Some Call !Calc 35.5 768.99 666566.3 and the bot calc the first Num1 with preset number like !Calc 10.5 21 30.5 and it will answer back 10.5x3 ---> 31.5 , 21x10 ---> 210 , 30.5/3 ---> 10.16666666 preset number are *3 *10 and /3 ... I'm already running a bot with the basic setup that he answer back at !ping etc... Thanks in advance !

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can try using mathjs, you can download it with nodejs. By npm install maths in your terminal.

You may check out documentation here.

Here is the template I have made in reference of mathjs.

const math = require('mathjs');

client.on('messageCreate', (message) => {
    let Equation = message.content.substring(message.content.indexOf(" ")).slice(1);
    let resp = math.evaluate(Equation);

})
about 4 years ago · Juan Pablo Isaza Denunciar
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