diff --git a/Commands/clear.js b/Commands/clear.js index 3b95d44..59bf030 100644 --- a/Commands/clear.js +++ b/Commands/clear.js @@ -8,11 +8,11 @@ module.exports = { CommandCreator() { const data = new SlashCommandBuilder() - .setName(this.name) - .setDescription(this.description) - .setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages) - .addIntegerOption(option => option.setName("amount").setDescription("the amount of messages to remove").setMinValue(1).setRequired(true)); - return data.toJSON(); + .setName(this.name) + .setDescription(this.description) + .setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages) + .addIntegerOption(option => option.setName("amount").setDescription("the amount of messages to remove").setMinValue(1).setRequired(true)); + return data.toJSON(); }, async run(bot, interaction) { diff --git a/Commands/help.js b/Commands/help.js index 1f2e711..f244e0e 100644 --- a/Commands/help.js +++ b/Commands/help.js @@ -1,5 +1,6 @@ -const { EmbedBuilder, SlashCommandBuilder } = require('discord.js'); - +const { SlashCommandBuilder, MessageFlags } = require('@discordjs/core'); +const { EmbedBuilder } = require('@discordjs/builders'); +const { Colors } = require('discord.js'); module.exports = { name: "help", @@ -8,22 +9,23 @@ module.exports = { CommandCreator() { const data = new SlashCommandBuilder() - .setName(this.name) - .setDescription(this.description); - return data.toJSON(); + .setName(this.name) + .setDescription(this.description); + return data.toJSON(); }, - async run(bot, interaction) { - const userEmbed = new EmbedBuilder() - .setColor('#0099ff') - .setTitle('Dev Pengu Help') - .setDescription('A List of Commands for Dev Pengu') - .addFields( - { name: '**Help**', value: '`/help`' }, - { name: '**Clear**', value: '`/clear amount`' }, - ) + async run(bot, interaction, api) { - interaction.reply({ embeds: [userEmbed] }) + const userEmbed = new EmbedBuilder() + .setTitle('Dev Pengu Help') + .setDescription('A List of Commands for Dev Pengu') + .setColor(Colors.Blurple) + .addFields( + { name: '**Help**', value: '`/help`' }, + { name: '**Clear**', value: '`/clear amount`' }, + ) + + api.interactions.reply(interaction.id, interaction.token, { embeds: [userEmbed] }) .catch(err => { console.log(err) return diff --git a/Commons/Data/User.js b/Commons/Data/User.js index 5245d66..88e3f39 100644 --- a/Commons/Data/User.js +++ b/Commons/Data/User.js @@ -28,9 +28,22 @@ let CreateUser = async (sql, server, user, username, owner) => { * @param sql {mysql.Connection} the mysql connection object * @param server {string} the id of which server you want ot create a user on * @param user {string} the id of which user you want to store + * @returns the user object fetched from database */ let GetUser = async (sql, server, user) => { - throw "not implemented"; + sql.query({ + sql: 'SELECT * FROM serverusers WHERE ?', + timeout: 40000, // 40s + values: {serverid: server, userid: user} + }, function (error, results, fields) { + // error will be an Error if one occurred during the query + if (error != undefined | null) { + throw `could not create user on server ${server} with userid ${user} due to error: ` + error + } + // results will contain the results of the query + return results[0]; + // fields will contain information about the returned results fields (if any) + }); } /** diff --git a/index.js b/index.js index 991be90..9f3c2b1 100644 --- a/index.js +++ b/index.js @@ -1,15 +1,23 @@ require("dotenv").config(); -const { Client, GatewayIntentBits, Collection, REST, Routes, Events, Partials } = require('discord.js'); +const {REST} = require("@discordjs/rest"); +const {WebSocketManager} = require("@discordjs/ws"); +const { Client, GatewayIntentBits, GatewayDispatchEvents, InteractionType } = require('@discordjs/core'); const fs = require('fs'); const sql = require('mysql'); const {CreateUser} = require('./Commons/Data/User') -const bot = new Client({ - intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildMembers ], - partials: [Partials.Message, Partials.Channel, Partials.Reaction], +let token = process.env.TOKEN; + +const rest = new REST({ version: '10' }).setToken(token); +const ws = new WebSocketManager({ + token, + intents: GatewayIntentBits.GuildMessages | GatewayIntentBits.MessageContent, + rest, }); -bot.commands = new Collection(); +const bot = new Client({ws, rest}); + +bot.commands = new Map(); const server = sql.createConnection({ host : process.env.DB_HOST, @@ -34,27 +42,34 @@ for (const file of commandFiles) { bot.commands.set(command.name, command); } -bot.on(Events.GuildMemberAdd, async user => { +bot.on(GatewayDispatchEvents.GuildMemberAdd, async user => { console.log(`new user found`, user.guild.id.toString(), user.user.id.toString(), user.user.username, false) await CreateUser(server, user.guild.id.toString(), user.user.id.toString(), user.user.username, false); -}) +}); -bot.on(Events.InteractionCreate, async interaction => { - // TODO: Adde Rolebased Permission Tracking rather then relying on discord permission system - if (!interaction.isChatInputCommand()) return; - let commandfile = bot.commands.get(interaction.commandName); - if (commandfile) commandfile.run(bot, interaction); -}) +bot.on(GatewayDispatchEvents.InteractionCreate, async ({ data: interaction, api }) => { + console.log(interaction.data.message); + + // TODO: Add Rolebased Permission Tracking rather then relying on discord permission system + if (InteractionType.ApplicationCommand){ + let commandfile = bot.commands.get(interaction.data.name); + if (commandfile) commandfile.run(bot, interaction, api); + } else { + // TODO: Handle Chat input + console.log("command gets triggered here"); + } +}); // Handles Reactions -bot.on(Events.MessageReactionAdd, async (reaction, user) => { +bot.on(GatewayDispatchEvents.MessageReactionAdd, async (reaction, user) => { if (user.bot) return; HandleReaction(reaction, user, undefined, "add", bot) -}) +}); -bot.on(Events.MessageReactionRemove, async (reaction, user) => { +bot.on(GatewayDispatchEvents.MessageReactionRemove, async (reaction, user) => { if (user.bot) return; HandleReaction(reaction, user, server, "remove", bot) -}) -bot.login(process.env.TOKEN) +}); + +ws.connect(); diff --git a/package-lock.json b/package-lock.json index 8d2964c..1b0ddec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,61 +1,117 @@ { "name": "dev-penguins", - "version": "1.0.0", + "version": "0.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dev-penguins", - "version": "1.0.0", + "version": "0.6.0", "license": "ISC", "dependencies": { + "@discordjs/builders": "^1.6.1", + "@discordjs/core": "^0.5.2", + "@discordjs/rest": "^1.7.0", + "@discordjs/ws": "^0.8.1", "discord.js": "^14.6.0", "dotenv": "^16.0.3", "mysql": "^2.18.1" } }, "node_modules/@discordjs/builders": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.4.0.tgz", - "integrity": "sha512-nEeTCheTTDw5kO93faM1j8ZJPonAX86qpq/QVoznnSa8WWcCgJpjlu6GylfINTDW6o7zZY0my2SYdxx2mfNwGA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.1.tgz", + "integrity": "sha512-CCcLwn/8ANhlAbhlE18fcaN0hfXTen53/JiwZs1t9oE/Cqa9maA8ZRarkCIsXF4J7J/MYnd0J6IsxeKsq+f6mw==", "dependencies": { - "@discordjs/util": "^0.1.0", - "@sapphire/shapeshift": "^3.7.1", - "discord-api-types": "^0.37.20", + "@discordjs/formatters": "^0.3.0", + "@discordjs/util": "^0.2.0", + "@sapphire/shapeshift": "^3.8.1", + "discord-api-types": "^0.37.37", "fast-deep-equal": "^3.1.3", - "ts-mixer": "^6.0.2", - "tslib": "^2.4.1" + "ts-mixer": "^6.0.3", + "tslib": "^2.5.0" }, "engines": { "node": ">=16.9.0" } }, + "node_modules/@discordjs/builders/node_modules/@discordjs/util": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.2.0.tgz", + "integrity": "sha512-/8qNbebFzLWKOOg+UV+RB8itp4SmU5jw0tBUD3ifElW6rYNOj1Ku5JaSW7lLl/WgjjxF01l/1uQPCzkwr110vg==", + "engines": { + "node": ">=16.9.0" + } + }, "node_modules/@discordjs/collection": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.3.0.tgz", - "integrity": "sha512-ylt2NyZ77bJbRij4h9u/wVy7qYw/aDqQLWnadjvDqW/WoWCxrsX6M3CIw9GVP5xcGCDxsrKj5e0r5evuFYwrKg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.0.tgz", + "integrity": "sha512-suyVndkEAAWrGxyw/CPGdtXoRRU6AUNkibtnbJevQzpelkJh3Q1gQqWDpqf5i39CnAn5+LrN0YS+cULeEjq2Yw==", + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/@discordjs/core": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@discordjs/core/-/core-0.5.2.tgz", + "integrity": "sha512-OEgK8GYNB1IJK3nPQ3QBvNUmuvlPTitc0j9oXe801Z7xWOFwL/lePAGhd6cAFH7yYaslwhCoSh85KI9glrmjNQ==", + "dependencies": { + "@discordjs/rest": "^1.7.0", + "@discordjs/util": "^0.2.0", + "@discordjs/ws": "^0.8.1", + "@sapphire/snowflake": "^3.4.2", + "@vladfrangu/async_event_emitter": "^2.2.1", + "discord-api-types": "^0.37.38" + }, + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/@discordjs/core/node_modules/@discordjs/util": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.2.0.tgz", + "integrity": "sha512-/8qNbebFzLWKOOg+UV+RB8itp4SmU5jw0tBUD3ifElW6rYNOj1Ku5JaSW7lLl/WgjjxF01l/1uQPCzkwr110vg==", + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/@discordjs/formatters": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.0.tgz", + "integrity": "sha512-Fc4MomalbP8HMKEMor3qUiboAKDtR7PSBoPjwm7WYghVRwgJlj5WYvUsriLsxeKk8+Qq2oy+HJlGTUkGvX0YnA==", + "dependencies": { + "discord-api-types": "^0.37.37" + }, "engines": { "node": ">=16.9.0" } }, "node_modules/@discordjs/rest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.4.0.tgz", - "integrity": "sha512-k3Ip7ffFSAfp7Mu4H/3BEXFvFz+JsbXRrRtpeBMnSp1LefhtlZWJE6xdXzNlblktKNQltnRwY+z0NZrGQdxAMw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.7.0.tgz", + "integrity": "sha512-r2HzmznRIo8IDGYBWqQfkEaGN1LrFfWQd3dSyC4tOpMU8nuVvFUEw6V/lwnG44jyOq+vgyDny2fxeUDMt9I4aQ==", "dependencies": { - "@discordjs/collection": "^1.3.0", - "@discordjs/util": "^0.1.0", + "@discordjs/collection": "^1.5.0", + "@discordjs/util": "^0.2.0", "@sapphire/async-queue": "^1.5.0", - "@sapphire/snowflake": "^3.2.2", - "discord-api-types": "^0.37.20", - "file-type": "^18.0.0", - "tslib": "^2.4.1", - "undici": "^5.13.0" + "@sapphire/snowflake": "^3.4.0", + "discord-api-types": "^0.37.37", + "file-type": "^18.2.1", + "tslib": "^2.5.0", + "undici": "^5.21.0" }, "engines": { "node": ">=16.9.0" } }, + "node_modules/@discordjs/rest/node_modules/@discordjs/util": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.2.0.tgz", + "integrity": "sha512-/8qNbebFzLWKOOg+UV+RB8itp4SmU5jw0tBUD3ifElW6rYNOj1Ku5JaSW7lLl/WgjjxF01l/1uQPCzkwr110vg==", + "engines": { + "node": ">=16.9.0" + } + }, "node_modules/@discordjs/util": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.1.0.tgz", @@ -64,6 +120,33 @@ "node": ">=16.9.0" } }, + "node_modules/@discordjs/ws": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-0.8.1.tgz", + "integrity": "sha512-RZwlluBGmrgAgvTHP8w9IW7Kp/idWEQgSHBs5h0ecqiWGVCueoIr6jMmvbxqZ7vVirric3zRhNdmG/TNRxhWLg==", + "dependencies": { + "@discordjs/collection": "^1.5.0", + "@discordjs/rest": "^1.7.0", + "@discordjs/util": "^0.2.0", + "@sapphire/async-queue": "^1.5.0", + "@types/ws": "^8.5.4", + "@vladfrangu/async_event_emitter": "^2.2.1", + "discord-api-types": "^0.37.38", + "tslib": "^2.5.0", + "ws": "^8.13.0" + }, + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/@discordjs/ws/node_modules/@discordjs/util": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.2.0.tgz", + "integrity": "sha512-/8qNbebFzLWKOOg+UV+RB8itp4SmU5jw0tBUD3ifElW6rYNOj1Ku5JaSW7lLl/WgjjxF01l/1uQPCzkwr110vg==", + "engines": { + "node": ">=16.9.0" + } + }, "node_modules/@sapphire/async-queue": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", @@ -74,12 +157,12 @@ } }, "node_modules/@sapphire/shapeshift": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.7.1.tgz", - "integrity": "sha512-JmYN/0GW49Vl8Hi4PwrsDBNjcuCylH78vWYolVys74LRIzilAAMINxx4RHQOdvYoz+ceJKVp4+zBbQ5kuIFOLw==", + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.8.2.tgz", + "integrity": "sha512-NXpnJAsxN3/h9TqQPntOeVWZrpIuucqXI3IWF6tj2fWCoRLCuVK5wx7Dtg7pRrtkYfsMUbDqgKoX26vrC5iYfA==", "dependencies": { "fast-deep-equal": "^3.1.3", - "lodash.uniqwith": "^4.5.0" + "lodash": "^4.17.21" }, "engines": { "node": ">=v14.0.0", @@ -87,9 +170,9 @@ } }, "node_modules/@sapphire/snowflake": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.3.0.tgz", - "integrity": "sha512-Hec5N6zEkZuZFLybVKyLFLlcSgYmR6C1/+9NkIhxPwOf6tgX52ndJCSz8ADejmbrNE0VuNCNkpzhRZzenEC9vA==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.4.2.tgz", + "integrity": "sha512-KJwlv5gkGjs1uFV7/xx81n3tqgBwBJvH94n1xDyH3q+JSmtsMeSleJffarEBfG2yAFeJiFA4BnGOK6FFPHc19g==", "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" @@ -106,13 +189,22 @@ "integrity": "sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g==" }, "node_modules/@types/ws": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", - "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", "dependencies": { "@types/node": "*" } }, + "node_modules/@vladfrangu/async_event_emitter": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.1.tgz", + "integrity": "sha512-XtUEAS0m6uVddXW+EImGunLiJZzWNWAZQBoQCUneowrYXPQ6y7c0iWEm/wVYyGpTixTIhUfLRSoYCwojL64htA==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, "node_modules/bignumber.js": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", @@ -138,9 +230,9 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/discord-api-types": { - "version": "0.37.21", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.21.tgz", - "integrity": "sha512-GB4ThibZEzWXcvgL2QfjKoDX5j1sNLWtgibodiJ9M9PM0u9bdR2t3vZ24oQWLKlksJehSJmZDtRsAibhcr46vw==" + "version": "0.37.39", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.39.tgz", + "integrity": "sha512-hkhQsQyzsTJITp311WXvHZh9j4RAMfIk2hPmsWeOTN50QTpg6zqmJNfel9D/8lYNvsU01wzw9281Yke8NhYyHg==" }, "node_modules/discord.js": { "version": "14.7.1", @@ -178,9 +270,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/file-type": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.0.0.tgz", - "integrity": "sha512-jjMwFpnW8PKofLE/4ohlhqwDk5k0NC6iy0UHAJFKoY1fQeGMN0GDdLgHQrvCbSpMwbqzoCZhRI5dETCZna5qVA==", + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.2.1.tgz", + "integrity": "sha512-Yw5MtnMv7vgD2/6Bjmmuegc8bQEVA9GmAyaR18bMYWKqsWDG9wgYZ1j4I6gNMF5Y5JBDcUcjRQqNQx7Y8uotcg==", "dependencies": { "readable-web-to-node-stream": "^3.0.2", "strtok3": "^7.0.0", @@ -222,16 +314,16 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, "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==" }, - "node_modules/lodash.uniqwith": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", - "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==" - }, "node_modules/mysql": { "version": "2.18.1", "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", @@ -293,9 +385,9 @@ } }, "node_modules/readable-web-to-node-stream/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -367,24 +459,24 @@ } }, "node_modules/ts-mixer": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.2.tgz", - "integrity": "sha512-zvHx3VM83m2WYCE8XL99uaM7mFwYSkjR2OZti98fabHrwkjsCvgwChda5xctein3xGOyaQhtTeDq/1H/GNvF3A==" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz", + "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==" }, "node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" }, "node_modules/undici": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.13.0.tgz", - "integrity": "sha512-UDZKtwb2k7KRsK4SdXWG7ErXiL7yTGgLWvk2AXO1JMjgjh404nFo6tWSCM2xMpJwMPx3J8i/vfqEh1zOqvj82Q==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.0.tgz", + "integrity": "sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA==", "dependencies": { "busboy": "^1.6.0" }, "engines": { - "node": ">=12.18" + "node": ">=14.0" } }, "node_modules/util-deprecate": { @@ -393,15 +485,15 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { diff --git a/package.json b/package.json index 9aa9a80..ebcfbd2 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,10 @@ "author": "", "license": "ISC", "dependencies": { + "@discordjs/builders": "^1.6.1", + "@discordjs/core": "^0.5.2", + "@discordjs/rest": "^1.7.0", + "@discordjs/ws": "^0.8.1", "discord.js": "^14.6.0", "dotenv": "^16.0.3", "mysql": "^2.18.1"