This repository has been archived on 2025-08-25. You can view files and clone it, but cannot push or open issues or pull requests.
Files
shiro-calculator/commands/cat.js
koneko 1009165751
All checks were successful
Deploy bot / build-and-deploy (push) Successful in 14s
abstract away prefix + ev cmd
2025-08-08 17:03:24 +02:00

32 lines
1.1 KiB
JavaScript

exports.name = "cat";
exports.description = ":cat: Calculates boost for cat.";
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 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 CLIENT_PREFIX:help.".replaceAll(
"CLIENT_PREFIX:",
client.prefix
)
);
let extraboost = Math.floor(levels / 3 - 3);
let players = Math.floor(levels / 29) + 1;
if (players > 4) players = 4;
message.channel.send(
`Your cat's boost should be atleast **${
boost + extraboost
}**. It will boost atleast **${players}** players.`
);
};