latest push

This commit is contained in:
John Facey
2022-07-27 17:39:58 -05:00
parent 9cac9a1735
commit 37f18aa71d
4 changed files with 20 additions and 2 deletions

17
commands/calc.js Normal file
View File

@@ -0,0 +1,17 @@
var libFlayer = require("../libFlayer.js");
module.exports = {
name: 'calc',
description: 'Calc',
execute(message, args) {
try {
if (args.length < 3) {
}
//var stringArgs = evaluate(args.join(" "));
//message.reply(`Answer: ${stringArgs}`);
} catch (err) {
message.reply(err.toString());
}
}
};

View File

@@ -44,7 +44,7 @@ module.exports = {
message.reply("Error in search"); message.reply("Error in search");
return; return;
} else { } else {
message.reply(searchString); message.reply('-' + searchString);
} }
if (count == 1) { if (count == 1) {

View File

@@ -22,6 +22,7 @@ module.exports = {
**!answer** - Answers for a question above: *!answer 1* **!answer** - Answers for a question above: *!answer 1*
**!npm** - Gets NPM info from repository: *!npm axios* **!npm** - Gets NPM info from repository: *!npm axios*
**!alert** - Gets weather alerts for an area: *!alert TX* **!alert** - Gets weather alerts for an area: *!alert TX*
**!calc** - Do math: *!calc 2 + 2*
` `
); );
} }

View File

@@ -112,7 +112,7 @@ client.on('interactionCreate', async interaction => {
} }
}); });
client.on('message', message => { client.on('messageCreate', message => {
if (!message.content.startsWith(prefix) || message.author.bot) return; if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(/ +/); const args = message.content.slice(prefix.length).trim().split(/ +/);