latest push
This commit is contained in:
17
commands/calc.js
Normal file
17
commands/calc.js
Normal 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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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*
|
||||||
`
|
`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
2
index.js
2
index.js
@@ -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(/ +/);
|
||||||
|
|||||||
Reference in New Issue
Block a user