This commit is contained in:
3
bot/.dockerignore
Normal file
3
bot/.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
npm-debug.log
|
||||
.env
|
16
bot/Dockerfile
Normal file
16
bot/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
ARG NODE_VERSION=23.0.0
|
||||
|
||||
FROM node:${NODE_VERSION}-alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install dependencies
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY --chown=node:node . .
|
||||
|
||||
USER node
|
||||
|
||||
CMD ["node", "index.js"]
|
39
bot/commands/bonus.js
Normal file
39
bot/commands/bonus.js
Normal file
@ -0,0 +1,39 @@
|
||||
exports.name = "bonus";
|
||||
exports.description =
|
||||
":star: Sums and calculates bonus for player stat numbers.";
|
||||
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 CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
args.forEach((arg) => {
|
||||
if (isNaN(parseInt(arg))) {
|
||||
is1nan = true;
|
||||
}
|
||||
arg = parseInt(arg);
|
||||
});
|
||||
if (is1nan)
|
||||
return message.channel.send(
|
||||
"You have provided invalid arguments to this command, please consult CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
let sum = 0;
|
||||
args.forEach((arg) => {
|
||||
if (arg > 2000) arg = 2000; // just dont bother for anything higher than 2000
|
||||
sum += parseInt(arg);
|
||||
});
|
||||
sum--;
|
||||
message.channel.send(
|
||||
`Will reach ${sum}, ${Math.ceil(sum * 1.4)} with bonus.`
|
||||
);
|
||||
};
|
31
bot/commands/cat.js
Normal file
31
bot/commands/cat.js
Normal file
@ -0,0 +1,31 @@
|
||||
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.`
|
||||
);
|
||||
};
|
32
bot/commands/cb.js
Normal file
32
bot/commands/cb.js
Normal file
@ -0,0 +1,32 @@
|
||||
const log = require("../log");
|
||||
exports.name = "cb";
|
||||
exports.description =
|
||||
":crossed_swords: Calculate calamity blade damage taking in to account projectile speed.";
|
||||
exports.usage = "CLIENT_PREFIX:cb <damage> <ups> [projectile speed]";
|
||||
exports.example = "CLIENT_PREFIX:cb 10000 250 10000";
|
||||
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 cb = parseInt(args[0]);
|
||||
let ups = parseInt(args[1]);
|
||||
if (isNaN(cb) || isNaN(ups))
|
||||
return message.channel.send("Damage or ups should be a number.");
|
||||
let initialspeed = null;
|
||||
if (args[2]) {
|
||||
initialspeed = parseInt(args[2]);
|
||||
if (isNaN(initialspeed))
|
||||
return message.channel.send("Projectile speed should be a number.");
|
||||
initialspeed = 30000 - initialspeed;
|
||||
let t = Math.ceil(initialspeed / 1200);
|
||||
log.info(t);
|
||||
ups = ups - t;
|
||||
}
|
||||
let resnum = cb + ups * 192;
|
||||
message.channel.send(`Your Calamity Blade will hit **${resnum}** damage.`);
|
||||
};
|
69
bot/commands/estimate.js
Normal file
69
bot/commands/estimate.js
Normal file
@ -0,0 +1,69 @@
|
||||
const log = require("../log");
|
||||
exports.name = "estimate";
|
||||
exports.description =
|
||||
":money_with_wings: Give an estimated price of certain items in cv.";
|
||||
exports.usage =
|
||||
"CLIENT_PREFIX:estimate [summary of item you want the price of]";
|
||||
exports.example =
|
||||
"CLIENT_PREFIX:estimate 1600 ab2\nCLIENT_PREFIX:estimate 1100 thp\nCLIENT_PREFIX:estimate 2400 app builder staff\n(you can also include `showtable` anywhere to show raw price data)\n(always put number first, do not put conflicting data to avoid confusion)";
|
||||
exports.hidden = false;
|
||||
exports.run = async (client, message, args) => {
|
||||
if (!args[0]) {
|
||||
return fetch(client.sharedEndpoint + "estimate" + "?getPriceTable=true")
|
||||
.then((d) => d.json())
|
||||
.then((tbl) => {
|
||||
return message.channel.send(
|
||||
`Available items in pricing table:\n\`\`\`\n${tbl.join(
|
||||
"\n"
|
||||
)}\`\`\`\nFor usage, consult \`CLIENT_PREFIX:help estimate\`
|
||||
`.replaceAll("CLIENT_PREFIX:", client.prefix)
|
||||
);
|
||||
});
|
||||
}
|
||||
const combined = args.join(" ");
|
||||
let showtable = combined.includes("showtable");
|
||||
fetch(
|
||||
client.sharedEndpoint +
|
||||
"estimate" +
|
||||
`?q=${combined}&showTable=` +
|
||||
showtable
|
||||
)
|
||||
.then((d) => d.json())
|
||||
.then((data) => {
|
||||
if (data.error) {
|
||||
return message.channel.send(data.error);
|
||||
} else {
|
||||
if (showtable) {
|
||||
const { returnKeyWord, subtable } = data;
|
||||
let res = "";
|
||||
subtable.forEach((entry) => {
|
||||
res +=
|
||||
String(entry.number).padEnd(14, " ") +
|
||||
entry.val +
|
||||
"\n";
|
||||
});
|
||||
message.channel.send(
|
||||
`Displaying data price table for \`${returnKeyWord}\`.\n\`\`\`\nGame Value\tPrice\n${res}\`\`\``
|
||||
);
|
||||
} else {
|
||||
const {
|
||||
gameValue,
|
||||
estimatedPrice,
|
||||
returnKeyWord,
|
||||
closestInTable,
|
||||
} = data;
|
||||
let stringprice;
|
||||
if (estimatedPrice > 499) {
|
||||
stringprice = `**__${estimatedPrice}__** (atleast 1 cheater, worth auctioning)`;
|
||||
} else if (estimatedPrice == 0) {
|
||||
stringprice = "**0** (<:TavKeep:1179145911180480563>)";
|
||||
} else {
|
||||
stringprice = `**${estimatedPrice}**`;
|
||||
}
|
||||
message.channel.send(
|
||||
`Hmm... I estimate your **${gameValue} ${returnKeyWord}** to be worth approximately ${stringprice} cv.\n*Estimation is provided through looking at past trades/price checks/sheets in DDRNG.*\n*Closest price in table: **${closestInTable.val}** cv, diff: **${closestInTable.diff}***.`
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
113
bot/commands/ev.js
Normal file
113
bot/commands/ev.js
Normal file
@ -0,0 +1,113 @@
|
||||
const BASEDMG = 1e9; // absurdly high to avoid base damage bottleneck
|
||||
|
||||
function getHeroDamageScaling(statVal) {
|
||||
return (
|
||||
1.0 +
|
||||
0.33 *
|
||||
(Math.pow(4.0, 0.1 * 1.1) -
|
||||
1.0 +
|
||||
0.68 * (Math.pow(statVal + 1, 0.375 * 1.1) - 1.0))
|
||||
);
|
||||
}
|
||||
|
||||
function getAb2Scaling(statVal) {
|
||||
return (
|
||||
1.0 +
|
||||
0.66 * (Math.pow(4.0, 0.0825) - 1.0) +
|
||||
0.75 * (Math.pow(statVal + 1, 0.3375) - 1.0)
|
||||
);
|
||||
}
|
||||
|
||||
function getTotalDamage(hdmgStat, baseDamage) {
|
||||
return Math.max(
|
||||
Math.max(32.0, Math.max(1.0, baseDamage)) *
|
||||
getHeroDamageScaling(hdmgStat) *
|
||||
(1.2 * 0.8 * 0.155),
|
||||
1.0
|
||||
);
|
||||
}
|
||||
|
||||
function getBeamDamage(hdmg, ab2) {
|
||||
return (
|
||||
getTotalDamage(hdmg, BASEDMG) * 0.6 * Math.pow(getAb2Scaling(ab2), 0.93)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find optimal split of totalStats between hdmg and ab2
|
||||
* using a binary/golden section search.
|
||||
*/
|
||||
function findOptimalDistribution(totalStats) {
|
||||
let left = 0;
|
||||
let right = totalStats;
|
||||
const phi = (Math.sqrt(5) - 1) / 2; // golden ratio for faster convergence
|
||||
let x1 = right - phi * (right - left);
|
||||
let x2 = left + phi * (right - left);
|
||||
|
||||
while (Math.abs(right - left) > 1e-3) {
|
||||
const f1 = getBeamDamage(x1, totalStats - x1);
|
||||
const f2 = getBeamDamage(x2, totalStats - x2);
|
||||
|
||||
if (f1 < f2) {
|
||||
left = x1;
|
||||
x1 = x2;
|
||||
x2 = left + phi * (right - left);
|
||||
} else {
|
||||
right = x2;
|
||||
x2 = x1;
|
||||
x1 = right - phi * (right - left);
|
||||
}
|
||||
}
|
||||
|
||||
const hdmg = (left + right) / 2;
|
||||
const ab2 = totalStats - hdmg;
|
||||
return {
|
||||
hdmg: hdmg,
|
||||
ab2: ab2,
|
||||
};
|
||||
}
|
||||
|
||||
exports.name = "ev";
|
||||
exports.description =
|
||||
":robot: Calculate how much hero damage/ab2 you should aim for.";
|
||||
exports.usage =
|
||||
"CLIENT_PREFIX:ev <hdmg> <ab2> OR CLIENT_PREFIX:ev <total stats>";
|
||||
exports.example = "CLIENT_PREFIX:ev 6000 5000\nCLIENT_PREFIX:ev 10000";
|
||||
exports.hidden = false;
|
||||
exports.run = (client, message, args) => {
|
||||
if (!args[0])
|
||||
return message.channel.send(
|
||||
"Not enough arguments, consult CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
let total = parseInt(args[0]);
|
||||
if (isNaN(total))
|
||||
return message.channel.send(
|
||||
"One of the arguments is not a number. Consult CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
if (args[1]) {
|
||||
if (isNaN(parseInt(args[1]))) {
|
||||
return message.channel.send(
|
||||
"One of the arguments is not a number. Consult CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
} else total += parseInt(args[1]);
|
||||
}
|
||||
|
||||
const distribution = findOptimalDistribution(total);
|
||||
|
||||
message.channel.send(
|
||||
`You should aim for **${
|
||||
Math.round(distribution.hdmg) - 3
|
||||
}** hero damage and **${
|
||||
Math.round(distribution.ab2) + 3
|
||||
}** ab2. *(approximately)*`
|
||||
);
|
||||
};
|
55
bot/commands/hb.js
Normal file
55
bot/commands/hb.js
Normal file
@ -0,0 +1,55 @@
|
||||
const STAT_MULT_INITIAL_AB2 = 0.66;
|
||||
const STAT_MULT_FULL_AB2 = 0.75;
|
||||
|
||||
const STAT_EXP_INITIAL_AB2 = 0.0825;
|
||||
const STAT_EXP_FULL_AB2 = 0.3375;
|
||||
|
||||
const ADDITIONAL_DAMAGE_MULTIPLIER = 0.25;
|
||||
const ADDITIONAL_DAMAGE_EXPONENT = 0.95;
|
||||
|
||||
// Functions
|
||||
function get_ab2_scaling(stat_val) {
|
||||
return (
|
||||
1.0 +
|
||||
STAT_MULT_INITIAL_AB2 *
|
||||
(Math.min(stat_val + 1.0, 4.0) ** STAT_EXP_INITIAL_AB2 - 1.0) +
|
||||
STAT_MULT_FULL_AB2 * ((stat_val + 1.0) ** STAT_EXP_FULL_AB2 - 1.0)
|
||||
);
|
||||
}
|
||||
|
||||
function get_damage_multiplier(stat_val) {
|
||||
return (
|
||||
1.0 +
|
||||
ADDITIONAL_DAMAGE_MULTIPLIER *
|
||||
get_ab2_scaling(Math.max(stat_val, 1)) ** ADDITIONAL_DAMAGE_EXPONENT
|
||||
);
|
||||
}
|
||||
|
||||
exports.name = "hb";
|
||||
exports.description = ":muscle: Calculate hero boost's damage multiplier.";
|
||||
exports.usage = "CLIENT_PREFIX:hb <points>";
|
||||
exports.example = "CLIENT_PREFIX:hb 5000";
|
||||
exports.hidden = false;
|
||||
exports.run = (client, message, args) => {
|
||||
if (!args[0])
|
||||
return message.channel.send(
|
||||
"Not enough arguments, consult CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
let hbPoints = parseInt(args[0]);
|
||||
if (isNaN(hbPoints))
|
||||
return message.channel.send(
|
||||
"Given argument is not a number. Consult CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
|
||||
message.channel.send(
|
||||
`With **${hbPoints}** points in your hero boost, you will boost with a **${get_damage_multiplier(
|
||||
hbPoints
|
||||
).toFixed(4)}** damage multiplier.`
|
||||
);
|
||||
};
|
49
bot/commands/help.js
Normal file
49
bot/commands/help.js
Normal file
@ -0,0 +1,49 @@
|
||||
const { EmbedBuilder } = require("discord.js");
|
||||
exports.name = "help";
|
||||
exports.description =
|
||||
":scroll: Shows this message and provides insight into other commands.";
|
||||
exports.usage = "CLIENT_PREFIX:help [optional other command]";
|
||||
exports.example = "CLIENT_PREFIX:help res";
|
||||
exports.hidden = false;
|
||||
exports.run = (client, message, args) => {
|
||||
let embed = new EmbedBuilder();
|
||||
embed.setTitle("Commands Helper");
|
||||
if (args[0]) {
|
||||
const cmd = client.commands.get(args[0]);
|
||||
if (!cmd)
|
||||
return message.channel.send(
|
||||
"Command not found, try `CLIENT_PREFIX:help` first.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
if (cmd.hidden && message.author.id != client.ownerID) return;
|
||||
embed.setTitle(`Help for \`${cmd.name}\` command`);
|
||||
embed.setDescription(cmd.description);
|
||||
embed.addFields(
|
||||
{
|
||||
name: "Usage",
|
||||
value: cmd.usage.replaceAll("CLIENT_PREFIX:", client.prefix),
|
||||
},
|
||||
{
|
||||
name: "Example",
|
||||
value: cmd.example.replaceAll("CLIENT_PREFIX:", client.prefix),
|
||||
}
|
||||
);
|
||||
} else {
|
||||
[...client.commands.values()]
|
||||
.sort((a, b) => (a.name > b.name ? 1 : -1))
|
||||
.forEach((cmd) => {
|
||||
if (cmd.hidden && message.author.id != client.ownerID) return;
|
||||
embed.addFields({
|
||||
name: cmd.name,
|
||||
value: cmd.description.replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
),
|
||||
});
|
||||
});
|
||||
}
|
||||
embed.setColor(0x00ff00);
|
||||
message.channel.send({ embeds: [embed] });
|
||||
};
|
33
bot/commands/ms.js
Normal file
33
bot/commands/ms.js
Normal file
@ -0,0 +1,33 @@
|
||||
const log = require("../log");
|
||||
exports.name = "ms";
|
||||
exports.description =
|
||||
":tada: Calculate moon staff damage taking in to account projectile speed.";
|
||||
exports.usage = "CLIENT_PREFIX:ms <elemental damage> <ups> [projectile speed]";
|
||||
exports.example = "CLIENT_PREFIX:ms 10000 250 10000";
|
||||
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 moonstaff = parseInt(args[0]);
|
||||
let ups = parseInt(args[1]);
|
||||
if (isNaN(moonstaff) || isNaN(ups))
|
||||
return message.channel.send("Damage or ups should be a number.");
|
||||
let initialspeed = null;
|
||||
if (args[2]) {
|
||||
initialspeed = parseInt(args[2]);
|
||||
if (isNaN(initialspeed))
|
||||
return message.channel.send("Projectile speed should be a number.");
|
||||
initialspeed = 30000 - initialspeed;
|
||||
let t = Math.ceil(initialspeed / 1200);
|
||||
log.info(t);
|
||||
ups = ups - t;
|
||||
}
|
||||
message.channel.send(
|
||||
`Your Moon Staff will hit ${moonstaff + ups * 99} damage.`
|
||||
);
|
||||
};
|
27
bot/commands/ping.js
Normal file
27
bot/commands/ping.js
Normal file
@ -0,0 +1,27 @@
|
||||
function format(seconds) {
|
||||
function pad(s) {
|
||||
return (s < 10 ? "0" : "") + s;
|
||||
}
|
||||
var hours = Math.floor(seconds / (60 * 60));
|
||||
var minutes = Math.floor((seconds % (60 * 60)) / 60);
|
||||
var seconds = Math.floor(seconds % 60);
|
||||
|
||||
return pad(hours) + "h " + pad(minutes) + "m " + pad(seconds) + "s.";
|
||||
}
|
||||
|
||||
exports.name = "ping";
|
||||
exports.description = ":ping_pong: View service statistics.";
|
||||
exports.usage = "CLIENT_PREFIX:ping";
|
||||
exports.example = "CLIENT_PREFIX:ping";
|
||||
exports.hidden = true;
|
||||
exports.run = async (client, message, args) => {
|
||||
message.channel.send("Fetching data...").then((m) => {
|
||||
m.edit(
|
||||
`🏓 Latency is **${
|
||||
m.createdTimestamp - message.createdTimestamp
|
||||
}ms**.\nAPI Latency is **${Math.round(
|
||||
client.ws.ping
|
||||
)}ms**.\nClient uptime is **${format(process.uptime())}**`
|
||||
);
|
||||
});
|
||||
};
|
25
bot/commands/refetch.js
Normal file
25
bot/commands/refetch.js
Normal file
@ -0,0 +1,25 @@
|
||||
exports.name = "refetch";
|
||||
exports.description = ":ninja: Refetch user react data.";
|
||||
exports.usage = "CLIENT_PREFIX:refetch";
|
||||
exports.example = "CLIENT_PREFIX:refetch";
|
||||
exports.hidden = true;
|
||||
exports.run = async (client, message, args) => {
|
||||
if (message.author.id != client.ownerID) return;
|
||||
try {
|
||||
const url = "https://drive.overflow.fun/public/react.json";
|
||||
client.usersToReactTo = [];
|
||||
const res = await fetch(url);
|
||||
const data = await res.json();
|
||||
|
||||
client.usersToReactTo = data.map((entry) => {
|
||||
const [userId, emoji] = entry.split("|");
|
||||
return { userId, emoji };
|
||||
});
|
||||
|
||||
message.channel.send(
|
||||
"Refetched react data. " + JSON.stringify(client.usersToReactTo)
|
||||
);
|
||||
} catch (e) {
|
||||
message.channel.send("copyparty instance unreachable/offline...");
|
||||
}
|
||||
};
|
49
bot/commands/res.js
Normal file
49
bot/commands/res.js
Normal file
@ -0,0 +1,49 @@
|
||||
const logger = require("../log");
|
||||
exports.name = "res";
|
||||
exports.description =
|
||||
":shield: Calculates how much upgrades you need to max your resistances. For Ult pieces and better. (slightly inaccurate but this is hard to calculate)";
|
||||
exports.usage =
|
||||
"CLIENT_PREFIX:res <res> <res> <res> [res] | <hero stat> <levels> [second hero stat]";
|
||||
exports.example = "CLIENT_PREFIX:res -3 1 -16 14 | 406 440";
|
||||
exports.hidden = false;
|
||||
exports.run = async (client, message, args) => {
|
||||
for (let i = 0; i < args.length; i++) {
|
||||
if (args[i] == "|") continue;
|
||||
args[i] = parseInt(args[i]);
|
||||
if (isNaN(args[i]))
|
||||
message.channel.send(
|
||||
"Unable to parse argument `" +
|
||||
i +
|
||||
1 +
|
||||
"` as number, try again or report this issue."
|
||||
);
|
||||
}
|
||||
let type;
|
||||
if (args[4] == "|") type = 4;
|
||||
else if (args[3] == "|") type = 3;
|
||||
else return message.channel.send("Please provide 3 or 4 resistances.");
|
||||
let resistances = [args[0], args[1], args[2], type == 4 ? args[3] : null];
|
||||
let mainStat1 = type == 4 ? args[5] : args[4];
|
||||
let upgrades = type == 4 ? args[6] : args[5];
|
||||
let substat = type == 4 ? args[7] : args[6];
|
||||
if (!mainStat1 || !upgrades)
|
||||
return message.channel.send("Please provide atleast 2 stats.");
|
||||
if (!substat) substat = 0;
|
||||
fetch(
|
||||
client.sharedEndpoint +
|
||||
"resistances" +
|
||||
`?mainStat=${mainStat1}&upgrades=${upgrades}&subStat=${substat}&resistances=${JSON.stringify(
|
||||
resistances
|
||||
)}`
|
||||
)
|
||||
.then((d) => d.json())
|
||||
.then((data) => {
|
||||
const { resUpgrades, mainStat, subStat, bonus } = data;
|
||||
logger.info(resUpgrades, mainStat, subStat, bonus);
|
||||
message.channel.send(
|
||||
`With ${resUpgrades} upgrades spent in resistances, your piece will reach ${
|
||||
mainStat + subStat
|
||||
}, or ${bonus} with set bonus!`
|
||||
);
|
||||
});
|
||||
};
|
56
bot/commands/tb.js
Normal file
56
bot/commands/tb.js
Normal file
@ -0,0 +1,56 @@
|
||||
const STAT_MULT_INITIAL_AB2 = 0.66;
|
||||
const STAT_MULT_FULL_AB2 = 0.75;
|
||||
|
||||
const STAT_EXP_INITIAL_AB2 = 0.0825;
|
||||
const STAT_EXP_FULL_AB2 = 0.3375;
|
||||
|
||||
// only this changed for tower boosting
|
||||
const ADDITIONAL_DAMAGE_MULTIPLIER = 0.1;
|
||||
const ADDITIONAL_DAMAGE_EXPONENT = 1.25;
|
||||
|
||||
// Functions
|
||||
function get_ab2_scaling(stat_val) {
|
||||
return (
|
||||
1.0 +
|
||||
STAT_MULT_INITIAL_AB2 *
|
||||
(Math.min(stat_val + 1.0, 4.0) ** STAT_EXP_INITIAL_AB2 - 1.0) +
|
||||
STAT_MULT_FULL_AB2 * ((stat_val + 1.0) ** STAT_EXP_FULL_AB2 - 1.0)
|
||||
);
|
||||
}
|
||||
|
||||
function get_damage_multiplier(stat_val) {
|
||||
return (
|
||||
1.0 +
|
||||
ADDITIONAL_DAMAGE_MULTIPLIER *
|
||||
get_ab2_scaling(Math.max(stat_val, 1)) ** ADDITIONAL_DAMAGE_EXPONENT
|
||||
);
|
||||
}
|
||||
|
||||
exports.name = "tb";
|
||||
exports.description = ":fire: Calculate tower boost's damage multiplier.";
|
||||
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 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 CLIENT_PREFIX:help.".replaceAll(
|
||||
"CLIENT_PREFIX:",
|
||||
client.prefix
|
||||
)
|
||||
);
|
||||
|
||||
message.channel.send(
|
||||
`With **${tbPoints}** points in your tower boost, you will boost towers with a **${get_damage_multiplier(
|
||||
tbPoints
|
||||
).toFixed(4)}** multiplier.`
|
||||
);
|
||||
};
|
91
bot/index.js
Normal file
91
bot/index.js
Normal file
@ -0,0 +1,91 @@
|
||||
const { Client, Events, GatewayIntentBits, Collection } = require("discord.js");
|
||||
const fs = require("fs");
|
||||
const log = require("./log");
|
||||
let cfg = {};
|
||||
try {
|
||||
cfg = require("./config.json");
|
||||
} catch (e) {
|
||||
console.warn(
|
||||
"config.json not found or invalid. Falling back to environment variables."
|
||||
);
|
||||
}
|
||||
const token = process.env.TOKEN || cfg.TOKEN;
|
||||
const prefix = process.env.PREFIX || cfg.PREFIX;
|
||||
const client = new Client({
|
||||
intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.GuildMessages,
|
||||
GatewayIntentBits.MessageContent,
|
||||
],
|
||||
});
|
||||
client.commands = new Collection();
|
||||
client.ownerID = 263247134147608578;
|
||||
client.prefix = prefix;
|
||||
client.sharedEndpoint = process.env.SHARED_ENDPOINT;
|
||||
if (!client.sharedEndpoint)
|
||||
return log.error("client.sharedEndpoint is undefined.");
|
||||
|
||||
fs.readdir("./commands/", (err, files) => {
|
||||
if (err) return console.error(err);
|
||||
files.forEach((file) => {
|
||||
if (!file.endsWith(".js")) return;
|
||||
let props = require(`./commands/${file}`);
|
||||
let commandName = file.split(".")[0];
|
||||
log.info("Loaded command " + commandName);
|
||||
client.commands.set(commandName, props);
|
||||
});
|
||||
});
|
||||
|
||||
const url = "https://drive.overflow.fun/public/react.json";
|
||||
client.usersToReactTo = [];
|
||||
client.once(Events.ClientReady, async (readyClient) => {
|
||||
try {
|
||||
const res = await fetch(url);
|
||||
const data = await res.json();
|
||||
|
||||
client.usersToReactTo = data.map((entry) => {
|
||||
const [userId, emoji] = entry.split("|");
|
||||
return { userId, emoji };
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn("copyparty is offline, wont work.");
|
||||
}
|
||||
log.info(`Ready! Logged in as ${readyClient.user.tag}`);
|
||||
});
|
||||
|
||||
client.on(Events.MessageCreate, async (message) => {
|
||||
if (message.author.bot) return;
|
||||
|
||||
client.usersToReactTo.forEach(async (item) => {
|
||||
if (
|
||||
message.mentions.users.find((u) => u.id == item.userId) &&
|
||||
!message.reference
|
||||
) {
|
||||
try {
|
||||
await message.react(item.emoji);
|
||||
} catch (err) {
|
||||
message.channel.send("FAILED TO REACT TO MESSAGE! " + err);
|
||||
console.error("Failed to react to message:", err);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (message.content.indexOf(prefix) !== 0) return;
|
||||
|
||||
const args = message.content.slice(prefix.length).trim().split(/ +/g);
|
||||
const command = args.shift().toLowerCase();
|
||||
|
||||
const cmd = client.commands.get(command);
|
||||
|
||||
if (!cmd) return;
|
||||
try {
|
||||
await cmd.run(client, message, args);
|
||||
} catch (e) {
|
||||
message.channel.send(
|
||||
"Command " + cmd.name + " exited with an exception: " + e
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// Log in to Discord with your client's token
|
||||
client.login(token);
|
14
bot/log.js
Normal file
14
bot/log.js
Normal file
@ -0,0 +1,14 @@
|
||||
// logger.js
|
||||
function log(level, message, ...args) {
|
||||
const now = new Date().toISOString();
|
||||
const levelLabel = `[${level.toUpperCase()}]`.padEnd(8);
|
||||
|
||||
console.log(`${now} ${levelLabel} ${message}`, ...args);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
info: (msg, ...args) => log("info", msg, ...args),
|
||||
warn: (msg, ...args) => log("warn", msg, ...args),
|
||||
error: (msg, ...args) => log("error", msg, ...args),
|
||||
debug: (msg, ...args) => log("debug", msg, ...args),
|
||||
};
|
299
bot/package-lock.json
generated
Normal file
299
bot/package-lock.json
generated
Normal file
@ -0,0 +1,299 @@
|
||||
{
|
||||
"name": "shirocalc",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "shirocalc",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"discord.js": "^14.14.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@discordjs/builders": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.7.0.tgz",
|
||||
"integrity": "sha512-GDtbKMkg433cOZur8Dv6c25EHxduNIBsxeHrsRoIM8+AwmEZ8r0tEpckx/sHwTLwQPOF3e2JWloZh9ofCaMfAw==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@discordjs/formatters": "^0.3.3",
|
||||
"@discordjs/util": "^1.0.2",
|
||||
"@sapphire/shapeshift": "^3.9.3",
|
||||
"discord-api-types": "0.37.61",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"ts-mixer": "^6.0.3",
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@discordjs/collection": {
|
||||
"version": "1.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz",
|
||||
"integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@discordjs/formatters": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.3.tgz",
|
||||
"integrity": "sha512-wTcI1Q5cps1eSGhl6+6AzzZkBBlVrBdc9IUhJbijRgVjCNIIIZPgqnUj3ntFODsHrdbGU8BEG9XmDQmgEEYn3w==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"discord-api-types": "0.37.61"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@discordjs/rest": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.2.0.tgz",
|
||||
"integrity": "sha512-nXm9wT8oqrYFRMEqTXQx9DUTeEtXUDMmnUKIhZn6O2EeDY9VCdwj23XCPq7fkqMPKdF7ldAfeVKyxxFdbZl59A==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@discordjs/collection": "^2.0.0",
|
||||
"@discordjs/util": "^1.0.2",
|
||||
"@sapphire/async-queue": "^1.5.0",
|
||||
"@sapphire/snowflake": "^3.5.1",
|
||||
"@vladfrangu/async_event_emitter": "^2.2.2",
|
||||
"discord-api-types": "0.37.61",
|
||||
"magic-bytes.js": "^1.5.0",
|
||||
"tslib": "^2.6.2",
|
||||
"undici": "5.27.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@discordjs/rest/node_modules/@discordjs/collection": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.0.0.tgz",
|
||||
"integrity": "sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@discordjs/util": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.0.2.tgz",
|
||||
"integrity": "sha512-IRNbimrmfb75GMNEjyznqM1tkI7HrZOf14njX7tCAAUetyZM1Pr8hX/EK2lxBCOgWDRmigbp24fD1hdMfQK5lw==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@discordjs/ws": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.2.tgz",
|
||||
"integrity": "sha512-+XI82Rm2hKnFwAySXEep4A7Kfoowt6weO6381jgW+wVdTpMS/56qCvoXyFRY0slcv7c/U8My2PwIB2/wEaAh7Q==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@discordjs/collection": "^2.0.0",
|
||||
"@discordjs/rest": "^2.1.0",
|
||||
"@discordjs/util": "^1.0.2",
|
||||
"@sapphire/async-queue": "^1.5.0",
|
||||
"@types/ws": "^8.5.9",
|
||||
"@vladfrangu/async_event_emitter": "^2.2.2",
|
||||
"discord-api-types": "0.37.61",
|
||||
"tslib": "^2.6.2",
|
||||
"ws": "^8.14.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@discordjs/ws/node_modules/@discordjs/collection": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.0.0.tgz",
|
||||
"integrity": "sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@fastify/busboy": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz",
|
||||
"integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/@sapphire/async-queue": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz",
|
||||
"integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=v14.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@sapphire/shapeshift": {
|
||||
"version": "3.9.3",
|
||||
"resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.3.tgz",
|
||||
"integrity": "sha512-WzKJSwDYloSkHoBbE8rkRW8UNKJiSRJ/P8NqJ5iVq7U2Yr/kriIBx2hW+wj2Z5e5EnXL1hgYomgaFsdK6b+zqQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"lodash": "^4.17.21"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=v14.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@sapphire/snowflake": {
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz",
|
||||
"integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=v14.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz",
|
||||
"integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/ws": {
|
||||
"version": "8.5.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.9.tgz",
|
||||
"integrity": "sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@vladfrangu/async_event_emitter": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz",
|
||||
"integrity": "sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=v14.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/discord-api-types": {
|
||||
"version": "0.37.61",
|
||||
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.61.tgz",
|
||||
"integrity": "sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/discord.js": {
|
||||
"version": "14.14.1",
|
||||
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.14.1.tgz",
|
||||
"integrity": "sha512-/hUVzkIerxKHyRKopJy5xejp4MYKDPTszAnpYxzVVv4qJYf+Tkt+jnT2N29PIPschicaEEpXwF2ARrTYHYwQ5w==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@discordjs/builders": "^1.7.0",
|
||||
"@discordjs/collection": "1.5.3",
|
||||
"@discordjs/formatters": "^0.3.3",
|
||||
"@discordjs/rest": "^2.1.0",
|
||||
"@discordjs/util": "^1.0.2",
|
||||
"@discordjs/ws": "^1.0.2",
|
||||
"@sapphire/snowflake": "3.5.1",
|
||||
"@types/ws": "8.5.9",
|
||||
"discord-api-types": "0.37.61",
|
||||
"fast-deep-equal": "3.1.3",
|
||||
"lodash.snakecase": "4.1.1",
|
||||
"tslib": "2.6.2",
|
||||
"undici": "5.27.2",
|
||||
"ws": "8.14.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lodash.snakecase": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
|
||||
"integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/magic-bytes.js": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.5.0.tgz",
|
||||
"integrity": "sha512-wJkXvutRbNWcc37tt5j1HyOK1nosspdh3dj6LUYYAvF6JYNqs53IfRvK9oEpcwiDA1NdoIi64yAMfdivPeVAyw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ts-mixer": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz",
|
||||
"integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
|
||||
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "5.27.2",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.27.2.tgz",
|
||||
"integrity": "sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fastify/busboy": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.14.2",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
|
||||
"integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bufferutil": "^4.0.1",
|
||||
"utf-8-validate": ">=5.0.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bufferutil": {
|
||||
"optional": true
|
||||
},
|
||||
"utf-8-validate": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
9
bot/package.json
Normal file
9
bot/package.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "bot",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"discord.js": "^14.14.1"
|
||||
}
|
||||
}
|
182
bot/yarn.lock
Normal file
182
bot/yarn.lock
Normal file
@ -0,0 +1,182 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@discordjs/builders@^1.7.0":
|
||||
version "1.7.0"
|
||||
resolved "https://registry.npmjs.org/@discordjs/builders/-/builders-1.7.0.tgz"
|
||||
integrity sha512-GDtbKMkg433cOZur8Dv6c25EHxduNIBsxeHrsRoIM8+AwmEZ8r0tEpckx/sHwTLwQPOF3e2JWloZh9ofCaMfAw==
|
||||
dependencies:
|
||||
"@discordjs/formatters" "^0.3.3"
|
||||
"@discordjs/util" "^1.0.2"
|
||||
"@sapphire/shapeshift" "^3.9.3"
|
||||
discord-api-types "0.37.61"
|
||||
fast-deep-equal "^3.1.3"
|
||||
ts-mixer "^6.0.3"
|
||||
tslib "^2.6.2"
|
||||
|
||||
"@discordjs/collection@^2.0.0":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/@discordjs/collection/-/collection-2.0.0.tgz"
|
||||
integrity sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==
|
||||
|
||||
"@discordjs/collection@1.5.3":
|
||||
version "1.5.3"
|
||||
resolved "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz"
|
||||
integrity sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==
|
||||
|
||||
"@discordjs/formatters@^0.3.3":
|
||||
version "0.3.3"
|
||||
resolved "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.3.tgz"
|
||||
integrity sha512-wTcI1Q5cps1eSGhl6+6AzzZkBBlVrBdc9IUhJbijRgVjCNIIIZPgqnUj3ntFODsHrdbGU8BEG9XmDQmgEEYn3w==
|
||||
dependencies:
|
||||
discord-api-types "0.37.61"
|
||||
|
||||
"@discordjs/rest@^2.1.0":
|
||||
version "2.2.0"
|
||||
resolved "https://registry.npmjs.org/@discordjs/rest/-/rest-2.2.0.tgz"
|
||||
integrity sha512-nXm9wT8oqrYFRMEqTXQx9DUTeEtXUDMmnUKIhZn6O2EeDY9VCdwj23XCPq7fkqMPKdF7ldAfeVKyxxFdbZl59A==
|
||||
dependencies:
|
||||
"@discordjs/collection" "^2.0.0"
|
||||
"@discordjs/util" "^1.0.2"
|
||||
"@sapphire/async-queue" "^1.5.0"
|
||||
"@sapphire/snowflake" "^3.5.1"
|
||||
"@vladfrangu/async_event_emitter" "^2.2.2"
|
||||
discord-api-types "0.37.61"
|
||||
magic-bytes.js "^1.5.0"
|
||||
tslib "^2.6.2"
|
||||
undici "5.27.2"
|
||||
|
||||
"@discordjs/util@^1.0.2":
|
||||
version "1.0.2"
|
||||
resolved "https://registry.npmjs.org/@discordjs/util/-/util-1.0.2.tgz"
|
||||
integrity sha512-IRNbimrmfb75GMNEjyznqM1tkI7HrZOf14njX7tCAAUetyZM1Pr8hX/EK2lxBCOgWDRmigbp24fD1hdMfQK5lw==
|
||||
|
||||
"@discordjs/ws@^1.0.2":
|
||||
version "1.0.2"
|
||||
resolved "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.2.tgz"
|
||||
integrity sha512-+XI82Rm2hKnFwAySXEep4A7Kfoowt6weO6381jgW+wVdTpMS/56qCvoXyFRY0slcv7c/U8My2PwIB2/wEaAh7Q==
|
||||
dependencies:
|
||||
"@discordjs/collection" "^2.0.0"
|
||||
"@discordjs/rest" "^2.1.0"
|
||||
"@discordjs/util" "^1.0.2"
|
||||
"@sapphire/async-queue" "^1.5.0"
|
||||
"@types/ws" "^8.5.9"
|
||||
"@vladfrangu/async_event_emitter" "^2.2.2"
|
||||
discord-api-types "0.37.61"
|
||||
tslib "^2.6.2"
|
||||
ws "^8.14.2"
|
||||
|
||||
"@fastify/busboy@^2.0.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz"
|
||||
integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==
|
||||
|
||||
"@sapphire/async-queue@^1.5.0":
|
||||
version "1.5.0"
|
||||
resolved "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz"
|
||||
integrity sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==
|
||||
|
||||
"@sapphire/shapeshift@^3.9.3":
|
||||
version "3.9.3"
|
||||
resolved "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.3.tgz"
|
||||
integrity sha512-WzKJSwDYloSkHoBbE8rkRW8UNKJiSRJ/P8NqJ5iVq7U2Yr/kriIBx2hW+wj2Z5e5EnXL1hgYomgaFsdK6b+zqQ==
|
||||
dependencies:
|
||||
fast-deep-equal "^3.1.3"
|
||||
lodash "^4.17.21"
|
||||
|
||||
"@sapphire/snowflake@^3.5.1", "@sapphire/snowflake@3.5.1":
|
||||
version "3.5.1"
|
||||
resolved "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz"
|
||||
integrity sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==
|
||||
|
||||
"@types/node@*":
|
||||
version "20.10.0"
|
||||
resolved "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz"
|
||||
integrity sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==
|
||||
dependencies:
|
||||
undici-types "~5.26.4"
|
||||
|
||||
"@types/ws@^8.5.9", "@types/ws@8.5.9":
|
||||
version "8.5.9"
|
||||
resolved "https://registry.npmjs.org/@types/ws/-/ws-8.5.9.tgz"
|
||||
integrity sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@vladfrangu/async_event_emitter@^2.2.2":
|
||||
version "2.2.2"
|
||||
resolved "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz"
|
||||
integrity sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==
|
||||
|
||||
discord-api-types@0.37.61:
|
||||
version "0.37.61"
|
||||
resolved "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.61.tgz"
|
||||
integrity sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw==
|
||||
|
||||
discord.js@^14.14.1:
|
||||
version "14.14.1"
|
||||
resolved "https://registry.npmjs.org/discord.js/-/discord.js-14.14.1.tgz"
|
||||
integrity sha512-/hUVzkIerxKHyRKopJy5xejp4MYKDPTszAnpYxzVVv4qJYf+Tkt+jnT2N29PIPschicaEEpXwF2ARrTYHYwQ5w==
|
||||
dependencies:
|
||||
"@discordjs/builders" "^1.7.0"
|
||||
"@discordjs/collection" "1.5.3"
|
||||
"@discordjs/formatters" "^0.3.3"
|
||||
"@discordjs/rest" "^2.1.0"
|
||||
"@discordjs/util" "^1.0.2"
|
||||
"@discordjs/ws" "^1.0.2"
|
||||
"@sapphire/snowflake" "3.5.1"
|
||||
"@types/ws" "8.5.9"
|
||||
discord-api-types "0.37.61"
|
||||
fast-deep-equal "3.1.3"
|
||||
lodash.snakecase "4.1.1"
|
||||
tslib "2.6.2"
|
||||
undici "5.27.2"
|
||||
ws "8.14.2"
|
||||
|
||||
fast-deep-equal@^3.1.3, fast-deep-equal@3.1.3:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz"
|
||||
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
|
||||
|
||||
lodash.snakecase@4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz"
|
||||
integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==
|
||||
|
||||
lodash@^4.17.21:
|
||||
version "4.17.21"
|
||||
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz"
|
||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
||||
|
||||
magic-bytes.js@^1.5.0:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.5.0.tgz"
|
||||
integrity sha512-wJkXvutRbNWcc37tt5j1HyOK1nosspdh3dj6LUYYAvF6JYNqs53IfRvK9oEpcwiDA1NdoIi64yAMfdivPeVAyw==
|
||||
|
||||
ts-mixer@^6.0.3:
|
||||
version "6.0.3"
|
||||
resolved "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz"
|
||||
integrity sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==
|
||||
|
||||
tslib@^2.6.2, tslib@2.6.2:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz"
|
||||
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
|
||||
|
||||
undici-types@~5.26.4:
|
||||
version "5.26.5"
|
||||
resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz"
|
||||
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
|
||||
|
||||
undici@5.27.2:
|
||||
version "5.27.2"
|
||||
resolved "https://registry.npmjs.org/undici/-/undici-5.27.2.tgz"
|
||||
integrity sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==
|
||||
dependencies:
|
||||
"@fastify/busboy" "^2.0.0"
|
||||
|
||||
ws@^8.14.2, ws@8.14.2:
|
||||
version "8.14.2"
|
||||
resolved "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz"
|
||||
integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==
|
Reference in New Issue
Block a user