abstract away prefix + ev cmd
All checks were successful
Deploy bot / build-and-deploy (push) Successful in 14s

This commit is contained in:
2025-08-08 17:03:24 +02:00
parent a57aa17deb
commit 1009165751
14 changed files with 226 additions and 51 deletions

20
old.js
View File

@ -28,7 +28,7 @@ client.on(Events.MessageCreate, (message) => {
return message.channel.send("not implemented.");
if (!args[0] || !args[1])
return message.channel.send(
"Not enough arguments, consult <<help."
"Not enough arguments, consult CLIENT_PREFIX:help."
);
let ab1 = parseInt(args[0]);
let ab2 = parseInt(args[1]);
@ -42,7 +42,7 @@ client.on(Events.MessageCreate, (message) => {
return message.channel.send("not implemented.");
if (!args[0] || !args[1])
return message.channel.send(
"Not enough arguments, consult <<help."
"Not enough arguments, consult CLIENT_PREFIX:help."
);
let ab1 = parseInt(args[0]);
let ab2 = parseInt(args[1]);
@ -57,7 +57,7 @@ client.on(Events.MessageCreate, (message) => {
if (command == "ms") {
if (!args[0] || !args[1])
return message.channel.send(
"Not enough arguments, consult <<help."
"Not enough arguments, consult CLIENT_PREFIX:help."
);
let cb = parseInt(args[0]);
let ups = parseInt(args[1]);
@ -209,7 +209,7 @@ client.on(Events.MessageCreate, (message) => {
if (command == "cat") {
if (!args[0] || !args[1])
return message.channel.send(
"Not enough arguments, consult <<help."
"Not enough arguments, consult CLIENT_PREFIX:help."
);
let boost = parseInt(args[0]);
let levels = parseInt(args[1]);
@ -225,7 +225,7 @@ client.on(Events.MessageCreate, (message) => {
if (command == "bident") {
if (!args[0] || !args[1])
return message.channel.send(
"Not enough arguments, consult <<help."
"Not enough arguments, consult CLIENT_PREFIX:help."
);
let damage = parseInt(args[0]);
let ups = parseInt(args[1]);
@ -250,7 +250,7 @@ client.on(Events.MessageCreate, (message) => {
if (command == "cdrag") {
if (!args[0] || !args[1] || !args[2])
return message.channel.send(
"Not enough arguments, consult <<help."
"Not enough arguments, consult CLIENT_PREFIX:help."
);
let damage = parseInt(args[0]);
let upgrades = parseInt(args[1]);
@ -270,19 +270,19 @@ client.on(Events.MessageCreate, (message) => {
embed.addFields(
{
name: "cat",
value: ":cat: Calculates boost for cat. (<<cat <boost> <levels>)",
value: ":cat: Calculates boost for cat. (CLIENT_PREFIX:cat <boost> <levels>)",
},
{
name: "cdrag",
value: ":dragon: Calculate damage for crystaline dragon taking into account upgrades and additional projectiles. (<<cdrag <base> <ups> <extra projectiles>)",
value: ":dragon: Calculate damage for crystaline dragon taking into account upgrades and additional projectiles. (CLIENT_PREFIX:cdrag <base> <ups> <extra projectiles>)",
},
{
name: "cb",
value: ":crossed_swords: Calculate calamity blade damage taking in to account speed. (<<cb <damage> <ups> [proj speed])",
value: ":crossed_swords: Calculate calamity blade damage taking in to account speed. (CLIENT_PREFIX:cb <damage> <ups> [proj speed])",
},
{
name: "bident",
value: ":trident: Calculate bident damage taking in to account speed and charge speed. (<<bident <damage> <ups> [proj speed] [charge speed])",
value: ":trident: Calculate bident damage taking in to account speed and charge speed. (CLIENT_PREFIX:bident <damage> <ups> [proj speed] [charge speed])",
},
{
name: "ms",