yay it works now

This commit is contained in:
rhearmas 2019-12-13 13:56:04 -05:00
parent f8d5d2efd2
commit 84cfb88286

View file

@ -37,7 +37,7 @@ exports.run = async (client, message, args, level) => {
message.delete(); message.delete();
if (!args[0]) { 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(" "); 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(`**Invalid math equation:** ${err}`);
} }
message.channel.send({ message.channel.send(client.embed('', stripIndents`**Equation:**\n\`\`\`\n${question}\n\`\`\`**Answer:**\n\`\`\`\n${answer}\n\`\`\``));
embed: new Discord.Richembed()
.setTitle("")
.setDescription("")
.addField("Equation",question)
.addField("Answer",answer)
});
}; };
exports.conf = { exports.conf = {
enabled: true, enabled: true,
guildOnly: false, guildOnly: false,
aliases: [], aliases: ['calc', 'math'],
permLevel: "User" permLevel: "User"
}; };
exports.help = { exports.help = {
name: "", name: "calculator",
category: "", category: "Utility",
description: "", description: "Calculates almost any math equation",
usage: "" usage: "calculate <equation>"
}; };