Discord-Math
Discord-Math is a simple calculator for discord.js bots! It can both do math in commands, as well as to the console. This package is mainly used for discord.js math command in your bot!
Installing
Run npm i discord-math
in a terminal!
Usage
Keep in mind that it can currently can only do 4 operations: +, -, *, /, **
Setup:
const math = ; moduleexports = name: "calculate" description: "The bot does math for you" run: async { try let num1 = Numberargs0; let operation = args1; let num2 = Numberargs2; if !num1 return messagechannel; if !operation return messagechannel; if !num2 return messagechannel; messagechannel; catch e console; }