From 98a5895caa0d74e0e8f834866acc3f1841bc8c2a Mon Sep 17 00:00:00 2001 From: TheMaestroo <61483023+TheMaestro0@users.noreply.github.com> Date: Fri, 28 Aug 2020 14:20:59 +0200 Subject: [PATCH] Fixed bug: ~calculate 4 4 :) | Remove white spaces --- src/commands/calculate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/calculate.js b/src/commands/calculate.js index e7737b3..8805489 100644 --- a/src/commands/calculate.js +++ b/src/commands/calculate.js @@ -1,6 +1,6 @@ var allowed = ["+", "-", "*", "/", "(", ")", " "]; exports.run = (client, message, args) => { - let exercise = args.join(" "); + let exercise = args.join("").trim(); if (!exercise) { return message.channel.send( @@ -39,4 +39,4 @@ exports.help = { category: "Utility", description: "Solves basic mathematical equations.", usage: "calculate [equation]" -}; \ No newline at end of file +};