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

255
Views
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 answers
Answer question

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 Report
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!