From 84cfb882868f1597394cd5efbeebea2495946971 Mon Sep 17 00:00:00 2001 From: rhearmas <34490428+qu-ota@users.noreply.github.com> Date: Fri, 13 Dec 2019 13:56:04 -0500 Subject: [PATCH] yay it works now --- commands/Utility/calculator.js | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/commands/Utility/calculator.js b/commands/Utility/calculator.js index 9a51f4c..93208d9 100644 --- a/commands/Utility/calculator.js +++ b/commands/Utility/calculator.js @@ -37,7 +37,7 @@ exports.run = async (client, message, args, level) => { message.delete(); if (!args[0]) { - message.reply("you must provide an equation to be solved!"); + return (await message.reply("you must provide an equation to be solved!")).delete(5000); } const question = args.join(" "); @@ -49,25 +49,19 @@ exports.run = async (client, message, args, level) => { message.channel.send(`**Invalid math equation:** ${err}`); } - message.channel.send({ - embed: new Discord.Richembed() - .setTitle("") - .setDescription("") - .addField("Equation",question) - .addField("Answer",answer) - }); + message.channel.send(client.embed('', stripIndents`**Equation:**\n\`\`\`\n${question}\n\`\`\`**Answer:**\n\`\`\`\n${answer}\n\`\`\``)); }; exports.conf = { enabled: true, guildOnly: false, - aliases: [], + aliases: ['calc', 'math'], permLevel: "User" }; exports.help = { - name: "", - category: "", - description: "", - usage: "" + name: "calculator", + category: "Utility", + description: "Calculates almost any math equation", + usage: "calculate " }; \ No newline at end of file