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:
@ -28,16 +28,24 @@ function get_damage_multiplier(stat_val) {
|
||||
|
||||
exports.name = "tb";
|
||||
exports.description = ":fire: Calculate tower boost's damage multiplier.";
|
||||
exports.usage = "<<tb <points>";
|
||||
exports.example = "<<tb 5000";
|
||||
exports.usage = "CLIENT_PREFIX:tb <points>";
|
||||
exports.example = "CLIENT_PREFIX:tb 5000";
|
||||
exports.hidden = false;
|
||||
exports.run = (client, message, args) => {
|
||||
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
|
||||
)
|
||||
);
|
||||
let tbPoints = parseInt(args[0]);
|
||||
if (isNaN(tbPoints))
|
||||
return message.channel.send(
|
||||
"Given argument is not a number. Consult <<help."
|
||||
"Given argument is not a number. Consult CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
|
||||
message.channel.send(
|
||||
|
Reference in New Issue
Block a user