abstract away prefix + ev cmd
All checks were successful
Deploy bot / build-and-deploy (push) Successful in 14s
All checks were successful
Deploy bot / build-and-deploy (push) Successful in 14s
This commit is contained in:
@ -1,13 +1,19 @@
|
||||
exports.name = "bonus";
|
||||
exports.description =
|
||||
":star: Sums and calculates bonus for player stat numbers.";
|
||||
exports.usage = "<<bonus <number> <number> [inf optional extra numbers]";
|
||||
exports.example = "<<bonus 100 100";
|
||||
exports.usage =
|
||||
"CLIENT_PREFIX:bonus <number> <number> [inf optional extra numbers]";
|
||||
exports.example = "CLIENT_PREFIX:bonus 100 100";
|
||||
exports.hidden = false;
|
||||
exports.run = (client, message, args) => {
|
||||
let is1nan = false;
|
||||
if (!args[0])
|
||||
return message.channel.send("Not enough arguments, consult <<help.");
|
||||
return message.channel.send(
|
||||
"Not enough arguments, consult CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
args.forEach((arg) => {
|
||||
if (isNaN(parseInt(arg))) {
|
||||
is1nan = true;
|
||||
@ -16,7 +22,10 @@ exports.run = (client, message, args) => {
|
||||
});
|
||||
if (is1nan)
|
||||
return message.channel.send(
|
||||
"You have provided invalid arguments to this command, please consult <<help."
|
||||
"You have provided invalid arguments to this command, please consult CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
let sum = 0;
|
||||
args.forEach((arg) => {
|
||||
|
Reference in New Issue
Block a user