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,16 +1,24 @@
|
||||
exports.name = "cat";
|
||||
exports.description = ":cat: Calculates boost for cat.";
|
||||
exports.usage = "<<cat <boost> <levels>";
|
||||
exports.example = "<<cat 80 120";
|
||||
exports.usage = "CLIENT_PREFIX:cat <boost> <levels>";
|
||||
exports.example = "CLIENT_PREFIX:cat 80 120";
|
||||
exports.hidden = false;
|
||||
exports.run = (client, message, args) => {
|
||||
if (!args[0] || !args[1])
|
||||
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
|
||||
)
|
||||
);
|
||||
let boost = parseInt(args[0]);
|
||||
let levels = parseInt(args[1]);
|
||||
if (isNaN(boost) || isNaN(levels))
|
||||
return message.channel.send(
|
||||
"Boost or levels is not a number. Consult <<help."
|
||||
"Boost or levels is not a number. Consult CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
let extraboost = Math.floor(levels / 3 - 3);
|
||||
let players = Math.floor(levels / 29) + 1;
|
||||
|
Reference in New Issue
Block a user