yay it works now
This commit is contained in:
parent
f8d5d2efd2
commit
84cfb88286
1 changed files with 7 additions and 13 deletions
|
@ -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>"
|
||||||
};
|
};
|
Loading…
Reference in a new issue