From 9e3cb9e88f4c9bd5d7e1f9cc2bc55be3548bf6d5 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Mon, 3 Oct 2022 16:20:18 -0700 Subject: [PATCH 01/29] remove cognito functions --- cognitoConfirmUser.js | 22 ---------------------- cognitoResendActivation.js | 21 --------------------- cognitoSignUp.js | 28 ---------------------------- 3 files changed, 71 deletions(-) delete mode 100644 cognitoConfirmUser.js delete mode 100644 cognitoResendActivation.js delete mode 100644 cognitoSignUp.js diff --git a/cognitoConfirmUser.js b/cognitoConfirmUser.js deleted file mode 100644 index 7f89dc6..0000000 --- a/cognitoConfirmUser.js +++ /dev/null @@ -1,22 +0,0 @@ -import { CognitoUser } from "amazon-cognito-identity-js"; -import { userPool } from "./config.js"; - -export const cognitoConfirmUser = (username, code, callback) => { - const cognitoUser = new CognitoUser({ - Username: username, - Pool: userPool, - }); - - cognitoUser.confirmRegistration(code, true, (err, result) => { - if (err) { - callback({ - message: - "Bir hata oluştu. Lutfen tekrar deneyin. Eğer hata devam ederse, lütfen bize ulaşın.", - }); - } else { - callback({ - message: "Üyelik onaylandı.", - }); - } - }); -}; diff --git a/cognitoResendActivation.js b/cognitoResendActivation.js deleted file mode 100644 index 938f74d..0000000 --- a/cognitoResendActivation.js +++ /dev/null @@ -1,21 +0,0 @@ -import { CognitoUser } from "amazon-cognito-identity-js"; -import { userPool } from "./config.js"; - -export const cognitoResendActivation = (username, callback) => { - const cognitoUser = new CognitoUser({ - Username: username, - Pool: userPool, - }); - - cognitoUser.resendConfirmationCode((err) => { - if (err) { - callback({ - message: err.message, - }); - return; - } - callback({ - message: "Aktivasyon kodu başarıyla gönderildi.", - }); - }); -}; diff --git a/cognitoSignUp.js b/cognitoSignUp.js deleted file mode 100644 index ae0eaab..0000000 --- a/cognitoSignUp.js +++ /dev/null @@ -1,28 +0,0 @@ -import { CognitoUserAttribute } from "amazon-cognito-identity-js"; -import { userPool } from "./config.js"; - -const generatePassword = (length) => { - const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - let password = ""; - for (let i = 0; i < length; i++) { - password += characters.charAt(Math.floor(Math.random() * characters.length)); - } - return password; -}; - -export const cognitoSignUp = (username, email, callback) => { - const emailData = { - Name: "email", - Value: email, - }; - const emailAttribute = new CognitoUserAttribute(emailData); - const password = generatePassword(8); - - userPool.signUp(username, password, [emailAttribute], null, (err, result) => { - if (err) { - callback({ username: null, password: null, error: err.message }); - } else { - callback({ username: result.user.getUsername(), password, error: null }); - } - }); -}; From 254871f89504870f319c14f3f5ed4bdb1f8cbf8d Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Mon, 3 Oct 2022 16:21:19 -0700 Subject: [PATCH 02/29] change to typescript --- .env | 7 + Dockerfile | 4 +- config.js | 18 - config.ts | 3 + ...DiscordClient.js => createDiscordClient.ts | 6 +- deploy-commands.js => deploy-commands.ts | 8 +- docker-compose.yaml | 40 +- index.js => index.ts | 6 +- jsconfig.json | 1 - package-lock.json | 599 +++++++++++++++++- package.json | 21 +- sendWithDefer.js => sendWithDefer.ts | 0 commands/signup.js => src/commands/signup.ts | 31 +- src/commands/unused/changePassword.js | 33 + .../commands/unused}/confirmActivation.js | 4 +- {commands => src/commands}/unused/goLive.js | 0 {commands => src/commands/unused}/help.js | 2 +- {commands => src/commands}/unused/info.js | 0 .../commands/unused}/resendActivation.js | 4 +- src/commands/unused/sendResetPasswordCode.js | 25 + src/handlers/sign-up.ts | 68 ++ src/utils.ts | 14 + tsconfig.json | 26 + 23 files changed, 823 insertions(+), 97 deletions(-) create mode 100644 .env delete mode 100644 config.js create mode 100644 config.ts rename createDiscordClient.js => createDiscordClient.ts (76%) rename deploy-commands.js => deploy-commands.ts (76%) rename index.js => index.ts (83%) delete mode 100644 jsconfig.json rename sendWithDefer.js => sendWithDefer.ts (100%) rename commands/signup.js => src/commands/signup.ts (59%) create mode 100644 src/commands/unused/changePassword.js rename {commands => src/commands/unused}/confirmActivation.js (86%) rename {commands => src/commands}/unused/goLive.js (100%) rename {commands => src/commands/unused}/help.js (92%) rename {commands => src/commands}/unused/info.js (100%) rename {commands => src/commands/unused}/resendActivation.js (82%) create mode 100644 src/commands/unused/sendResetPasswordCode.js create mode 100644 src/handlers/sign-up.ts create mode 100644 src/utils.ts create mode 100644 tsconfig.json diff --git a/.env b/.env new file mode 100644 index 0000000..ed72d65 --- /dev/null +++ b/.env @@ -0,0 +1,7 @@ +# Environment variables declared in this file are automatically made available to Prisma. +# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema + +# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. +# See the documentation for all the connection string options: https://pris.ly/d/connection-strings + +PANO_URL="http://localhost:3000" diff --git a/Dockerfile b/Dockerfile index 9fe88ad..cfc6f44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,4 +25,6 @@ WORKDIR /app COPY --from=deps /app/node_modules /app/node_modules ADD . . -CMD ["./node_modules/.bin/nodemon", "index.js"] +# CMD ["./node_modules/.bin/nodemon", "index.ts"] +# CMD ["node", "--loader", "ts-node/esm", "index.ts"] +CMD ["npm", "run", "dev"] diff --git a/config.js b/config.js deleted file mode 100644 index ae7d2ef..0000000 --- a/config.js +++ /dev/null @@ -1,18 +0,0 @@ -import { CognitoUserPool } from "amazon-cognito-identity-js"; - -export const DISCORD_TOKEN = process.env.DISCORD_TOKEN; -export const GUILD_ID = process.env.GUILD_ID; -export const CLIENT_ID = process.env.CLIENT_ID; -export const COGNITO_USERPOOL_ID = process.env.COGNITO_USERPOOL_ID; -export const COGNITO_CLIENT_ID = process.env.COGNITO_CLIENT_ID; - -const poolData = { - UserPoolId: COGNITO_USERPOOL_ID, - ClientId: COGNITO_CLIENT_ID, -}; - -const createUserPool = () => { - return new CognitoUserPool(poolData); -}; - -export const userPool = createUserPool(); diff --git a/config.ts b/config.ts new file mode 100644 index 0000000..486ecfd --- /dev/null +++ b/config.ts @@ -0,0 +1,3 @@ +export const GUILD_ID = "504590280675295233"; +export const CLIENT_ID = "967524936551895051"; +export const DISCORD_TOKEN = "OTY3NTI0OTM2NTUxODk1MDUx.YmRj0A.Qgn849DFxCQpC2evCr2MB_suQ3A"; diff --git a/createDiscordClient.js b/createDiscordClient.ts similarity index 76% rename from createDiscordClient.js rename to createDiscordClient.ts index b9fc684..862e7bc 100644 --- a/createDiscordClient.js +++ b/createDiscordClient.ts @@ -9,7 +9,7 @@ export const createDiscordClient = async () => { const client = new Client({ intents, partials: ["MESSAGE", "CHANNEL", "REACTION", "USER", "GUILD_MEMBER"], - }); + }) as Client & { commands: Collection }; // When the client is ready, run this code (only once) client.once("ready", () => { @@ -17,10 +17,10 @@ export const createDiscordClient = async () => { }); client.commands = new Collection(); - const commandFiles = readdirSync("./commands").filter((file) => file.endsWith(".js")); + const commandFiles = readdirSync("./src/commands").filter((file) => file.endsWith(".ts")); for (const file of commandFiles) { - const command = await import(`./commands/${file}`); + const command = await import(`./src/commands/${file}`); client.commands.set(command.default.data.name, command); } diff --git a/deploy-commands.js b/deploy-commands.ts similarity index 76% rename from deploy-commands.js rename to deploy-commands.ts index b16c806..7252a72 100644 --- a/deploy-commands.js +++ b/deploy-commands.ts @@ -1,13 +1,13 @@ import { REST } from "@discordjs/rest"; -import { CLIENT_ID, DISCORD_TOKEN, GUILD_ID } from "./config.js"; import { readdirSync } from "fs"; import { Routes } from "discord-api-types/v9"; +import { CLIENT_ID, DISCORD_TOKEN, GUILD_ID } from "./config"; -const commands = []; -const commandFiles = readdirSync("./commands").filter((file) => file.endsWith(".js")); +const commands: any[] = []; +const commandFiles = readdirSync("./src/commands").filter((file) => file.endsWith(".ts")); for (const file of commandFiles) { - const command = await import(`./commands/${file}`); + const command = await import(`./src/commands/${file}`); commands.push(command.default.data.toJSON()); } diff --git a/docker-compose.yaml b/docker-compose.yaml index ecfd3f0..13b048a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,20 +6,46 @@ services: - DISCORD_TOKEN=OTY3NTI0OTM2NTUxODk1MDUx.YmRj0A.Qgn849DFxCQpC2evCr2MB_suQ3A - GUILD_ID=839425986817818654 - CLIENT_ID=967524936551895051 - - COGNITO_USERPOOL_ID=eu-central-1_IbWSTtlMK - - COGNITO_CLIENT_ID=4hv808r649t602m0d0ve8pba17 + - PANO_URL=http://localhost:3000 - DEBUG=kampus-bot* ports: - - "3000:3000" + - "6000:6000" deploycmds: build: . - entrypoint: node ./deploy-commands.js + entrypoint: node --loader ts-node/esm ./deploy-commands.ts environment: - DISCORD_TOKEN=OTY3NTI0OTM2NTUxODk1MDUx.YmRj0A.Qgn849DFxCQpC2evCr2MB_suQ3A - # - GUILD_ID=504590280675295233 - GUILD_ID=839425986817818654 - CLIENT_ID=967524936551895051 - - COGNITO_USERPOOL_ID=eu-central-1_IbWSTtlMK - - COGNITO_CLIENT_ID=4hv808r649t602m0d0ve8pba17 + - PANO_URL=http://localhost:3000 - DEBUG=kampus-bot* + dev: + container_name: "bot" + build: . + volumes: + - ./src:/app/src + - ./tsconfig.json:/app/tsconfig.json + environment: + - DISCORD_TOKEN=OTg0OTU1NTcyOTE2OTg5OTcy.GXDIwB.316J4_CFOlbmeLs2drHJj7kIsnmqzEXpMtoEIo + - GUILD_ID=504590280675295233 + - CLIENT_ID=984955572916989972 + - PANO_URL=http://localhost:3000 + - DEBUG=kampus-bot* + ports: + - "6000:6000" + devcmds: + build: . + entrypoint: node --loader ts-node/esm ./deploy-commands.ts + environment: + - DISCORD_TOKEN=OTg0OTU1NTcyOTE2OTg5OTcy.GXDIwB.316J4_CFOlbmeLs2drHJj7kIsnmqzEXpMtoEIo + - GUILD_ID=504590280675295233 + - CLIENT_ID=984955572916989972 + - PANO_URL=http://pano:3000 + - DEBUG=kampus-bot* +networks: + default: + external: + name: pano_default + + diff --git a/index.js b/index.ts similarity index 83% rename from index.js rename to index.ts index cd24f8a..64f31f1 100644 --- a/index.js +++ b/index.ts @@ -1,9 +1,9 @@ -import { DISCORD_TOKEN, GUILD_ID } from "./config.js"; -import { createDiscordClient } from "./createDiscordClient.js"; +import { DISCORD_TOKEN, GUILD_ID } from "./config"; +import { createDiscordClient } from "./createDiscordClient"; const client = await createDiscordClient(); -const isUserInThisGuild = async (userID, guildID) => { +const isUserInThisGuild = async (userID: string, guildID: string) => { const guild = await client.guilds.fetch(guildID); try { diff --git a/jsconfig.json b/jsconfig.json deleted file mode 100644 index 0967ef4..0000000 --- a/jsconfig.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/package-lock.json b/package-lock.json index 7da09c2..afe9cce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,15 +11,36 @@ "dependencies": { "@discordjs/builders": "^0.13.0", "@discordjs/rest": "^0.4.1", + "@prisma/client": "^4.3.1", "amazon-cognito-identity-js": "^5.2.8", + "bcryptjs": "^2.4.3", "debug": "^4.3.4", "discord-api-types": "^0.31.2", "discord.js": "^13.6.0", - "nodemon": "^2.0.15" + "node-fetch": "^3.2.10", + "nodemon": "^2.0.15", + "tiny-invariant": "^1.2.0", + "ts-node": "^10.9.1", + "unique-names-generator": "^4.7.1" }, "devDependencies": { + "@types/bcryptjs": "^2.4.2", + "@types/node": "^18.7.18", "eslint-config-prettier": "^8.5.0", - "prettier": "^2.6.2" + "prettier": "^2.6.2", + "tslib": "^2.4.0", + "typescript": "^4.8.3" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" } }, "node_modules/@discordjs/builders": { @@ -78,6 +99,25 @@ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.29.0.tgz", "integrity": "sha512-Ekq1ICNpOTVajXKZguNFrsDeTmam+ZeA38txsNLZnANdXUjU6QBPIZLUQTC6MzigFGb0Tt8vk4xLnXmzv0shNg==" }, + "node_modules/@discordjs/rest/node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/@eslint/eslintrc": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", @@ -121,6 +161,53 @@ "dev": true, "peer": true }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@prisma/client": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.3.1.tgz", + "integrity": "sha512-FA0/d1VMJNWqzU7WVWTNWJ+lGOLR9JUBnF73GdIPAEVo/6dWk4gHx0EmgeU+SMv4MZoxgOeTBJF2azhg7x0hMw==", + "hasInstallScript": true, + "dependencies": { + "@prisma/engines-version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b" + }, + "engines": { + "node": ">=14.17" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, + "node_modules/@prisma/engines-version": { + "version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b.tgz", + "integrity": "sha512-8yWpXkQRmiSfsi2Wb/ZS5D3RFbeu/btL9Pm/gdF4phB0Lo5KGsDFMxFMgaD64mwED2nHc8ZaEJg/+4Jymb9Znw==" + }, "node_modules/@sapphire/async-queue": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz", @@ -170,10 +257,36 @@ "node": ">=6" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" + }, + "node_modules/@types/bcryptjs": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.2.tgz", + "integrity": "sha512-LiMQ6EOPob/4yUL66SZzu6Yh77cbzJFYll+ZfaPiPPFswtIlA/Fs1MzdKYA7JApHU49zQTbJGX3PDmCpIdDBRQ==", + "dev": true + }, "node_modules/@types/node": { - "version": "17.0.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz", - "integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==" + "version": "18.7.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", + "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==" }, "node_modules/@types/node-fetch": { "version": "2.6.1", @@ -214,8 +327,6 @@ "version": "8.7.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true, - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -233,6 +344,14 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -304,6 +423,11 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -340,6 +464,11 @@ } ] }, + "node_modules/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -583,6 +712,11 @@ "node": ">=8" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -611,6 +745,14 @@ "node": ">=8" } }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", + "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", + "engines": { + "node": ">= 12" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -666,6 +808,14 @@ "node": ">=0.4.0" } }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/discord-api-types": { "version": "0.31.2", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.31.2.tgz", @@ -715,6 +865,25 @@ "node": ">=12" } }, + "node_modules/discord.js/node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -981,6 +1150,28 @@ "dev": true, "peer": true }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -1039,6 +1230,17 @@ "node": ">= 6" } }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1419,6 +1621,25 @@ "unfetch": "^4.2.0" } }, + "node_modules/isomorphic-unfetch/node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/js-cookie": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz", @@ -1537,6 +1758,11 @@ "semver": "bin/semver.js" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -1592,23 +1818,39 @@ "dev": true, "peer": true }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", + "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", "dependencies": { - "whatwg-url": "^5.0.0" + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, "node_modules/nodemon": { @@ -2081,6 +2323,11 @@ "dev": true, "peer": true }, + "node_modules/tiny-invariant": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.2.0.tgz", + "integrity": "sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg==" + }, "node_modules/to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", @@ -2114,13 +2361,55 @@ "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/ts-mixer": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz", "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg==" }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", @@ -2158,6 +2447,18 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typescript": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", + "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/undefsafe": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", @@ -2168,6 +2469,14 @@ "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==" }, + "node_modules/unique-names-generator": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/unique-names-generator/-/unique-names-generator-4.7.1.tgz", + "integrity": "sha512-lMx9dX+KRmG8sq6gulYYpKWZc9RlGsgBR6aoO8Qsm3qvkSJ+3rAymr+TnV8EDMrIrwuFJ4kruzMWM/OpYzPoow==", + "engines": { + "node": ">=8" + } + }, "node_modules/unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -2248,15 +2557,28 @@ "dev": true, "peer": true }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "engines": { + "node": ">= 8" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -2364,6 +2686,14 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "engines": { + "node": ">=6" + } + }, "node_modules/zod": { "version": "3.14.4", "resolved": "https://registry.npmjs.org/zod/-/zod-3.14.4.tgz", @@ -2374,6 +2704,14 @@ } }, "dependencies": { + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + } + }, "@discordjs/builders": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.13.0.tgz", @@ -2416,6 +2754,14 @@ "version": "0.29.0", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.29.0.tgz", "integrity": "sha512-Ekq1ICNpOTVajXKZguNFrsDeTmam+ZeA38txsNLZnANdXUjU6QBPIZLUQTC6MzigFGb0Tt8vk4xLnXmzv0shNg==" + }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } } } }, @@ -2456,6 +2802,38 @@ "dev": true, "peer": true }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@prisma/client": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.3.1.tgz", + "integrity": "sha512-FA0/d1VMJNWqzU7WVWTNWJ+lGOLR9JUBnF73GdIPAEVo/6dWk4gHx0EmgeU+SMv4MZoxgOeTBJF2azhg7x0hMw==", + "requires": { + "@prisma/engines-version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b" + } + }, + "@prisma/engines-version": { + "version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b.tgz", + "integrity": "sha512-8yWpXkQRmiSfsi2Wb/ZS5D3RFbeu/btL9Pm/gdF4phB0Lo5KGsDFMxFMgaD64mwED2nHc8ZaEJg/+4Jymb9Znw==" + }, "@sapphire/async-queue": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz", @@ -2484,10 +2862,36 @@ "defer-to-connect": "^1.0.1" } }, + "@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" + }, + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + }, + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + }, + "@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" + }, + "@types/bcryptjs": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.2.tgz", + "integrity": "sha512-LiMQ6EOPob/4yUL66SZzu6Yh77cbzJFYll+ZfaPiPPFswtIlA/Fs1MzdKYA7JApHU49zQTbJGX3PDmCpIdDBRQ==", + "dev": true + }, "@types/node": { - "version": "17.0.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz", - "integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==" + "version": "18.7.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", + "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==" }, "@types/node-fetch": { "version": "2.6.1", @@ -2526,9 +2930,7 @@ "acorn": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true, - "peer": true + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==" }, "acorn-jsx": { "version": "5.3.2", @@ -2538,6 +2940,11 @@ "peer": true, "requires": {} }, + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" + }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -2593,6 +3000,11 @@ "picomatch": "^2.0.4" } }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -2615,6 +3027,11 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, + "bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -2794,6 +3211,11 @@ "xdg-basedir": "^4.0.0" } }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2816,6 +3238,11 @@ "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==" }, + "data-uri-to-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", + "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==" + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -2854,6 +3281,11 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + }, "discord-api-types": { "version": "0.31.2", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.31.2.tgz", @@ -2891,6 +3323,14 @@ "version": "0.26.1", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz", "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==" + }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } } } }, @@ -3100,6 +3540,15 @@ "dev": true, "peer": true }, + "fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "requires": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + } + }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -3146,6 +3595,14 @@ "mime-types": "^2.1.12" } }, + "formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "requires": { + "fetch-blob": "^3.1.2" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3415,6 +3872,16 @@ "requires": { "node-fetch": "^2.6.1", "unfetch": "^4.2.0" + }, + "dependencies": { + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } + } } }, "js-cookie": { @@ -3513,6 +3980,11 @@ } } }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -3556,12 +4028,19 @@ "dev": true, "peer": true }, + "node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" + }, "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", + "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", "requires": { - "whatwg-url": "^5.0.0" + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" } }, "nodemon": { @@ -3905,6 +4384,11 @@ "dev": true, "peer": true }, + "tiny-invariant": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.2.0.tgz", + "integrity": "sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg==" + }, "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", @@ -3929,13 +4413,33 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "ts-mixer": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz", "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg==" }, + "ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + } + }, "tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", @@ -3964,6 +4468,11 @@ "is-typedarray": "^1.0.0" } }, + "typescript": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", + "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==" + }, "undefsafe": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", @@ -3974,6 +4483,11 @@ "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==" }, + "unique-names-generator": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/unique-names-generator/-/unique-names-generator-4.7.1.tgz", + "integrity": "sha512-lMx9dX+KRmG8sq6gulYYpKWZc9RlGsgBR6aoO8Qsm3qvkSJ+3rAymr+TnV8EDMrIrwuFJ4kruzMWM/OpYzPoow==" + }, "unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -4038,15 +4552,25 @@ "dev": true, "peer": true }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + }, + "web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" + }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -4119,6 +4643,11 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + }, "zod": { "version": "3.14.4", "resolved": "https://registry.npmjs.org/zod/-/zod-3.14.4.tgz", diff --git a/package.json b/package.json index 987f8b0..f32932a 100644 --- a/package.json +++ b/package.json @@ -2,26 +2,37 @@ "name": "discord-bot", "version": "1.0.0", "description": "", - "main": "index.js", + "main": "index.ts", "type": "module", "scripts": { - "start": "nodemon index.js", - "test": "echo \"Error: no test specified\" && exit 1" + "start": "nodemon index.ts", + "test": "echo \"Error: no test specified\" && exit 1", + "dev": "ts-node ./index.ts" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { + "@types/bcryptjs": "^2.4.2", + "@types/node": "^18.7.18", "eslint-config-prettier": "^8.5.0", - "prettier": "^2.6.2" + "prettier": "^2.6.2", + "tslib": "^2.4.0", + "typescript": "^4.8.3" }, "dependencies": { "@discordjs/builders": "^0.13.0", "@discordjs/rest": "^0.4.1", + "@prisma/client": "^4.3.1", "amazon-cognito-identity-js": "^5.2.8", + "bcryptjs": "^2.4.3", "debug": "^4.3.4", "discord-api-types": "^0.31.2", "discord.js": "^13.6.0", - "nodemon": "^2.0.15" + "node-fetch": "^3.2.10", + "nodemon": "^2.0.15", + "tiny-invariant": "^1.2.0", + "ts-node": "^10.9.1", + "unique-names-generator": "^4.7.1" } } diff --git a/sendWithDefer.js b/sendWithDefer.ts similarity index 100% rename from sendWithDefer.js rename to sendWithDefer.ts diff --git a/commands/signup.js b/src/commands/signup.ts similarity index 59% rename from commands/signup.js rename to src/commands/signup.ts index 3ca17d7..a3ec6f5 100644 --- a/commands/signup.js +++ b/src/commands/signup.ts @@ -1,6 +1,9 @@ import { bold, SlashCommandBuilder, spoiler } from "@discordjs/builders"; -import { cognitoSignUp } from "../cognitoSignUp.js"; -import { sendWithDefer } from "../sendWithDefer.js"; +import { signUp } from "../handlers/sign-up"; +import { sendWithDefer } from "../../sendWithDefer"; + +const usernameOption = "kullanici-adi"; +const emailOption = "e-posta"; const signup = { data: new SlashCommandBuilder() @@ -8,7 +11,7 @@ const signup = { .setDescription("pano.kamp.us'a üye olmak için kullanılır") .addStringOption((option) => option - .setName("kullanici-adi") + .setName(usernameOption) .setDescription("pano.kamp.us'e kayıt olmak için kullanıcı adı") .setRequired(true) ) @@ -18,29 +21,27 @@ const signup = { .setDescription("pano.kamp.us'e kayıt olmak için email adresi") .setRequired(true) ), - async execute(interaction) { - const email = interaction.options.getString("e-posta"); - const username = interaction.options.getString("kullanici-adi"); + async execute(interaction: any) { + const email = interaction.options.getString(emailOption); + const username = interaction.options.getString(usernameOption); const loginUrl = "https://pano.kamp.us/login"; - cognitoSignUp(username, email, async ({ username, password, error }) => { - if (error) { - await sendWithDefer(interaction, 2000, error); - return; - } + const { data, errors } = await signUp(username, email); + + if (errors) { + await sendWithDefer(interaction, 4000, errors); + } else { await sendWithDefer( interaction, 2000, `${username} ismiyle kayıt oldun` + - `\nHesabının şifresi -> ${spoiler(password)} <- olarak ayarlandı` + - `\nEmail adresine aktivasyon kodu gönderildi` + + `\nHesabının şifresi -> ${spoiler(data.password)} <- olarak ayarlandı` + `\n-----------------------------------------------------------` + - `\n/uyelik-onayla komutunu çalıstırarak üyeliğini onaylayabilirsin` + `\n/yardim komutunu çalıstırarak bütün komutları görebilirsin` + `\nhttps://pano.kamp.us/login adresinden giriş yaptıktan sonra şifreni değiştirmeni öneririz` + `\n:tada::tada: ${bold(loginUrl)} :tada::tada:` ); - }); + } }, }; diff --git a/src/commands/unused/changePassword.js b/src/commands/unused/changePassword.js new file mode 100644 index 0000000..f776847 --- /dev/null +++ b/src/commands/unused/changePassword.js @@ -0,0 +1,33 @@ +import { SlashCommandBuilder } from "@discordjs/builders"; +import { cognitoChangePassword } from "../../../cognitoChangePassword.js"; +import { sendWithDefer } from "../../../sendWithDefer.js"; +import Debug from "debug"; + +const debug = Debug("kampus-bot:commands:changePassword"); + +const changePassword = { + data: new SlashCommandBuilder() + .setName("sifre-degistir") + .setDescription("Kullanicinin sifresini degistirir.") + .addStringOption((option) => + option.setName("kullanici-adi").setDescription("Kullanıcı adı").setRequired(true) + ) + .addStringOption((option) => + option.setName("sifirlama-kodu").setDescription("Sıfırlama kodu").setRequired(true) + ) + .addStringOption((option) => + option.setName("yeni-sifre").setRequired(true).setDescription("Yeni şifre") + ), + async execute(interaction) { + const username = interaction.options.getString("kullanici-adi"); + const code = interaction.options.getString("sifirlama-kodu"); + const password = interaction.options.getString("yeni-sifre"); + + cognitoChangePassword(username, code, password, async ({ message }) => { + await sendWithDefer(interaction, 2000, message); + }); + }, +}; +debug("registered"); + +export default changePassword; diff --git a/commands/confirmActivation.js b/src/commands/unused/confirmActivation.js similarity index 86% rename from commands/confirmActivation.js rename to src/commands/unused/confirmActivation.js index 0793155..66007f3 100644 --- a/commands/confirmActivation.js +++ b/src/commands/unused/confirmActivation.js @@ -1,6 +1,6 @@ import { SlashCommandBuilder } from "@discordjs/builders"; -import { cognitoConfirmUser } from "../cognitoConfirmUser.js"; -import { sendWithDefer } from "../sendWithDefer.js"; +import { cognitoConfirmUser } from "../../../cognitoConfirmUser.js"; +import { sendWithDefer } from "../../../sendWithDefer.js"; const confirmActivation = { data: new SlashCommandBuilder() diff --git a/commands/unused/goLive.js b/src/commands/unused/goLive.js similarity index 100% rename from commands/unused/goLive.js rename to src/commands/unused/goLive.js diff --git a/commands/help.js b/src/commands/unused/help.js similarity index 92% rename from commands/help.js rename to src/commands/unused/help.js index 00c3401..8ae4d4c 100644 --- a/commands/help.js +++ b/src/commands/unused/help.js @@ -1,5 +1,5 @@ import { SlashCommandBuilder } from "@discordjs/builders"; -import { sendWithDefer } from "../sendWithDefer.js"; +import { sendWithDefer } from "../../../sendWithDefer.js"; import Debug from "debug"; const debug = Debug("kampus-bot:commands:help"); diff --git a/commands/unused/info.js b/src/commands/unused/info.js similarity index 100% rename from commands/unused/info.js rename to src/commands/unused/info.js diff --git a/commands/resendActivation.js b/src/commands/unused/resendActivation.js similarity index 82% rename from commands/resendActivation.js rename to src/commands/unused/resendActivation.js index 74dbefa..a7c0680 100644 --- a/commands/resendActivation.js +++ b/src/commands/unused/resendActivation.js @@ -1,6 +1,6 @@ import { SlashCommandBuilder } from "@discordjs/builders"; -import { cognitoResendActivation } from "../cognitoResendActivation.js"; -import { sendWithDefer } from "../sendWithDefer.js"; +import { cognitoResendActivation } from "../../../cognitoResendActivation.js"; +import { sendWithDefer } from "../../../sendWithDefer.js"; const resendActivation = { data: new SlashCommandBuilder() diff --git a/src/commands/unused/sendResetPasswordCode.js b/src/commands/unused/sendResetPasswordCode.js new file mode 100644 index 0000000..7027f68 --- /dev/null +++ b/src/commands/unused/sendResetPasswordCode.js @@ -0,0 +1,25 @@ +import { SlashCommandBuilder } from "@discordjs/builders"; +import { cognitoForgotPassword } from "../../../cognitoForgotPassword.js"; +import { sendWithDefer } from "../../../sendWithDefer.js"; + +const sendResetPasswordCode = { + data: new SlashCommandBuilder() + .setName("sifremi-unuttum") + .setDescription("pano.kamp.us hesabının şifresini sıfırlamak için gereken kodu gönderir.") + .addStringOption((option) => + option.setName("kullanici-adi").setDescription("Kullanıcı adı").setRequired(true) + ), + async execute(interaction) { + const username = interaction.options.getString("kullanici-adi"); + + cognitoForgotPassword(username, async ({ message }) => { + await sendWithDefer( + interaction, + 2000, + `Email adresine sifre sifirlama kodu gonderildi. Bu kodu /sifre-degistir komutuyla calistiriniz.` + ); + }); + }, +}; + +export default sendResetPasswordCode; diff --git a/src/handlers/sign-up.ts b/src/handlers/sign-up.ts new file mode 100644 index 0000000..6f5b4e2 --- /dev/null +++ b/src/handlers/sign-up.ts @@ -0,0 +1,68 @@ +import fetch, { FormData } from "node-fetch"; +import { generatePassword, validateEmail, validateUsername } from "../utils"; + +const Error = (message: string) => { + return { errors: message, data: { user: {}, password: "" } }; +}; + +interface Errors { + email?: string; + username?: string; + password?: string; +} +interface ActionData { + data: any; + errors: Errors; +} +function isEmpty(obj) { + return Object.keys(obj).length === 0; +} + +export const signUp = async (username: string, email: string) => { + if (!validateUsername(username)) { + return Error("Username is invalid"); + } + if (!validateEmail(email)) { + return Error("Email is invalid"); + } + + // const existingUserByEmail = await getUserByEmail(prisma, email); + // const existingUserByUsername = await getUserByUsername(prisma, username); + // if (existingUserByEmail) { + // return Error("Someone is registered with this email"); + // } + // if (existingUserByUsername) { + // return Error("This username is taken"); + // } + + const password = generatePassword(); + const form = new FormData(); + form.append("username", username); + form.append("email", email); + form.append("password", password); + + try { + const url = "https://pano.kamp.us/api/auth/register"; + const response = await fetch(url, { + method: "POST", + body: form, + }); + + const user = (await response.json()) as ActionData; + if (user.errors && !isEmpty(user.errors)) { + const errorMessage = getErrorMessage(user.errors); + return Error(errorMessage); + } else { + return { errors: "", data: { user: user.data, password } }; + } + } catch (e) { + return Error(`Error: ${e}`); + } +}; + +const getErrorMessage = (errors: Errors) => { + if (errors.email) return errors.email; + if (errors.username) return errors.username; + if (errors.password) return errors.password; + return "Something went wrong"; +}; diff --git a/src/utils.ts b/src/utils.ts new file mode 100644 index 0000000..32f2c23 --- /dev/null +++ b/src/utils.ts @@ -0,0 +1,14 @@ +import { adjectives, animals, colors, uniqueNamesGenerator } from "unique-names-generator"; + +export function validateEmail(email: unknown): email is string { + return typeof email === "string" && email.length > 3 && email.includes("@"); +} +export function validateUsername(username: unknown): username is string { + return typeof username === "string" && username.length >= 2; +} +export function validatePassword(password: unknown): password is string { + return typeof password === "string" && password.length > 8; +} +export function generatePassword() { + return uniqueNamesGenerator({ dictionaries: [adjectives, colors, animals] }); +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..1342302 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "es2022", + "lib": ["ES2022"], + "allowJs": true, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "module": "ES2022", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "noImplicitAny": false + }, + "exclude": [ + "node_modules", + ], + "ts-node": { + "esm": true, + "experimentalSpecifierResolution": "node", + } +} From bb9b3ed56bbefd12fa7bf488854d35aa98281bb5 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Tue, 19 Sep 2023 21:27:59 -0700 Subject: [PATCH 03/29] --wip-- --- .env | 7 - config.ts | 9 +- createDiscordClient.ts | 63 +- deploy-commands.ts | 9 +- index.ts | 38 +- package-lock.json | 3671 ++++------------- package.json | 6 +- src/api/gpt.ts | 66 + src/commands/login.ts | 39 + src/commands/{ => unused}/signup.ts | 33 +- src/events/interactionCreate.ts | 22 + .../sign-up.ts => features/kampus-sign-up.ts} | 12 +- src/handlers/command.handler.ts | 26 + src/handlers/event.handler.ts | 29 + src/utils.ts | 14 - src/utils/index.ts | 39 + tsconfig.json | 5 +- 17 files changed, 996 insertions(+), 3092 deletions(-) delete mode 100644 .env create mode 100644 src/api/gpt.ts create mode 100644 src/commands/login.ts rename src/commands/{ => unused}/signup.ts (51%) create mode 100644 src/events/interactionCreate.ts rename src/{handlers/sign-up.ts => features/kampus-sign-up.ts} (80%) create mode 100644 src/handlers/command.handler.ts create mode 100644 src/handlers/event.handler.ts delete mode 100644 src/utils.ts create mode 100644 src/utils/index.ts diff --git a/.env b/.env deleted file mode 100644 index ed72d65..0000000 --- a/.env +++ /dev/null @@ -1,7 +0,0 @@ -# Environment variables declared in this file are automatically made available to Prisma. -# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema - -# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. -# See the documentation for all the connection string options: https://pris.ly/d/connection-strings - -PANO_URL="http://localhost:3000" diff --git a/config.ts b/config.ts index 486ecfd..322752c 100644 --- a/config.ts +++ b/config.ts @@ -1,3 +1,8 @@ -export const GUILD_ID = "504590280675295233"; +export const GUILD_ID = "717812863414042624"; export const CLIENT_ID = "967524936551895051"; -export const DISCORD_TOKEN = "OTY3NTI0OTM2NTUxODk1MDUx.YmRj0A.Qgn849DFxCQpC2evCr2MB_suQ3A"; +export const DISCORD_TOKEN = + "OTY3NTI0OTM2NTUxODk1MDUx.GKNC0b.el6R45Roys1V7IBPahAYwaKzgu-6QYOvYQQO4g"; + +export const NEXTAUTH_URL = "http://pasaport.localhost.kamp.us:3001/auth"; + +export const CHATGPT_API_KEY = ""; diff --git a/createDiscordClient.ts b/createDiscordClient.ts index 862e7bc..b5558bf 100644 --- a/createDiscordClient.ts +++ b/createDiscordClient.ts @@ -1,28 +1,57 @@ -// Create a new client instance -import { Client, Collection, Intents } from "discord.js"; -import { readdirSync } from "fs"; +import { Client, Collection, GatewayIntentBits, Partials } from "discord.js"; +import { readdirSync, realpathSync } from "fs"; +import { join } from "path"; -// 32767 means every FLAGS in discord.js in bits -const intents = new Intents(32767); +export interface DiscordClient extends Client { + commands: Collection; +} export const createDiscordClient = async () => { const client = new Client({ - intents, - partials: ["MESSAGE", "CHANNEL", "REACTION", "USER", "GUILD_MEMBER"], - }) as Client & { commands: Collection }; + intents: [ + GatewayIntentBits.Guilds, + GatewayIntentBits.GuildMembers, + GatewayIntentBits.GuildScheduledEvents, + GatewayIntentBits.GuildInvites, + GatewayIntentBits.GuildPresences, + GatewayIntentBits.GuildVoiceStates, + GatewayIntentBits.GuildMessages, + GatewayIntentBits.GuildMessageReactions, + GatewayIntentBits.GuildMessageTyping, + GatewayIntentBits.DirectMessages, + GatewayIntentBits.DirectMessageReactions, + GatewayIntentBits.DirectMessageTyping, + GatewayIntentBits.MessageContent, + ], + partials: [ + Partials.Message, + Partials.Channel, + Partials.Reaction, + Partials.User, + Partials.GuildMember, + ], + }) as DiscordClient; + client.commands = new Collection(); + + const dirname = realpathSync("."); // When the client is ready, run this code (only once) - client.once("ready", () => { + client.once("ready", async () => { console.log("Ready!"); - }); - client.commands = new Collection(); - const commandFiles = readdirSync("./src/commands").filter((file) => file.endsWith(".ts")); - - for (const file of commandFiles) { - const command = await import(`./src/commands/${file}`); - client.commands.set(command.default.data.name, command); - } + console.log("REGISTERING HANDLERS"); + const handlerFolderPath = join(dirname, "src/handlers"); + const handlerFiles = readdirSync(handlerFolderPath).filter((file) => { + return file.endsWith(".handler.ts"); + }); + console.log(handlerFiles); + for (const file of handlerFiles) { + console.log("REGISTERING HANDLE: ", file); + const filePath = join(handlerFolderPath, file); + const handler = await import(filePath); + handler.default(client); + } + }); return client; }; diff --git a/deploy-commands.ts b/deploy-commands.ts index 7252a72..cec0d56 100644 --- a/deploy-commands.ts +++ b/deploy-commands.ts @@ -1,6 +1,5 @@ -import { REST } from "@discordjs/rest"; +import { REST, Routes } from "discord.js"; import { readdirSync } from "fs"; -import { Routes } from "discord-api-types/v9"; import { CLIENT_ID, DISCORD_TOKEN, GUILD_ID } from "./config"; const commands: any[] = []; @@ -8,12 +7,12 @@ const commandFiles = readdirSync("./src/commands").filter((file) => file.endsWit for (const file of commandFiles) { const command = await import(`./src/commands/${file}`); + console.log(file, "file"); commands.push(command.default.data.toJSON()); + console.log(commands); } -console.log(commands, "COMMANDS"); - -const rest = new REST({ version: "9" }).setToken(DISCORD_TOKEN); +const rest = new REST({ version: "10" }).setToken(DISCORD_TOKEN); (async (env) => { try { diff --git a/index.ts b/index.ts index 64f31f1..24afa9c 100644 --- a/index.ts +++ b/index.ts @@ -1,44 +1,8 @@ -import { DISCORD_TOKEN, GUILD_ID } from "./config"; +import { DISCORD_TOKEN } from "./config"; import { createDiscordClient } from "./createDiscordClient"; const client = await createDiscordClient(); -const isUserInThisGuild = async (userID: string, guildID: string) => { - const guild = await client.guilds.fetch(guildID); - - try { - await guild.members.fetch(userID); - return true; - } catch (error) { - return false; - } -}; - -client.on("interactionCreate", async (interaction) => { - const userID = interaction.user.id; - const isUserInKampus = await isUserInThisGuild(userID, GUILD_ID); - - if (!isUserInKampus) { - return; - } - - if (!interaction.isCommand()) return; - - const command = client.commands.get(interaction.commandName); - - if (!command) return; - - try { - await command.default.execute(interaction, client); - } catch (error) { - console.error(error); - await interaction.reply({ - content: "There was an error trying to execute that command!", - ephemeral: true, - }); - } -}); - // Login to Discord with your client's token client.login(DISCORD_TOKEN).then(() => { console.log("Logged in!"); diff --git a/package-lock.json b/package-lock.json index afe9cce..aac44b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7 +1,7 @@ { "name": "discord-bot", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -16,22 +16,32 @@ "bcryptjs": "^2.4.3", "debug": "^4.3.4", "discord-api-types": "^0.31.2", - "discord.js": "^13.6.0", + "discord.js": "^14.13.0", "node-fetch": "^3.2.10", - "nodemon": "^2.0.15", + "nodemon": "^2.0.22", "tiny-invariant": "^1.2.0", "ts-node": "^10.9.1", "unique-names-generator": "^4.7.1" }, "devDependencies": { "@types/bcryptjs": "^2.4.2", - "@types/node": "^18.7.18", + "@types/node": "^20.6.1", "eslint-config-prettier": "^8.5.0", "prettier": "^2.6.2", "tslib": "^2.4.0", "typescript": "^4.8.3" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -47,6 +57,7 @@ "version": "0.13.0", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.13.0.tgz", "integrity": "sha512-4L9y26KRNNU8Y7J78SRUN1Uhava9D8jfit/YqEaKi8gQRc7PdqKqk2poybo6RXaiyt/BgKYPfcjxT7WvzGfYCA==", + "deprecated": "no longer supported", "dependencies": { "@sapphire/shapeshift": "^2.0.0", "@sindresorhus/is": "^4.6.0", @@ -60,18 +71,35 @@ } }, "node_modules/@discordjs/collection": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz", - "integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz", + "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==", + "deprecated": "no longer supported", "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" + "node": ">=16.9.0" + } + }, + "node_modules/@discordjs/formatters": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.2.tgz", + "integrity": "sha512-lE++JZK8LSSDRM5nLjhuvWhGuKiXqu+JZ/DsOR89DVVia3z9fdCJVcHF2W/1Zxgq0re7kCzmAJlCMMX3tetKpA==", + "dependencies": { + "discord-api-types": "0.37.50" + }, + "engines": { + "node": ">=16.11.0" } }, + "node_modules/@discordjs/formatters/node_modules/discord-api-types": { + "version": "0.37.50", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.50.tgz", + "integrity": "sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==" + }, "node_modules/@discordjs/rest": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-0.4.1.tgz", "integrity": "sha512-rtWy+AIfNlfjGkAgA2TJLASdqli07aTNQceVGT6RQQiQaEqV0nsfBO4WtDlDzk7PmO3w+InP3dpwEolJI5jz0A==", + "deprecated": "no longer supported", "dependencies": { "@discordjs/collection": "^0.7.0-dev", "@sapphire/async-queue": "^1.3.1", @@ -86,23 +114,15 @@ "node": ">=16.9.0" } }, - "node_modules/@discordjs/rest/node_modules/@discordjs/collection": { - "version": "0.7.0-dev.1650672508-3617093", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0-dev.1650672508-3617093.tgz", - "integrity": "sha512-Got8gPiFFEwY0tJo6hK/ZGvg8LFEYMyopchL/l5WjvN5YXDSKqlcSfWk3SqA9F8Eb2ZloauUoXY2B3uMMJUUBA==", - "engines": { - "node": ">=16.9.0" - } - }, "node_modules/@discordjs/rest/node_modules/discord-api-types": { "version": "0.29.0", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.29.0.tgz", "integrity": "sha512-Ekq1ICNpOTVajXKZguNFrsDeTmam+ZeA38txsNLZnANdXUjU6QBPIZLUQTC6MzigFGb0Tt8vk4xLnXmzv0shNg==" }, "node_modules/@discordjs/rest/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -118,42 +138,154 @@ } } }, + "node_modules/@discordjs/util": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.0.1.tgz", + "integrity": "sha512-d0N2yCxB8r4bn00/hvFZwM7goDcUhtViC5un4hPj73Ba4yrChLSJD8fy7Ps5jpTLg1fE9n4K0xBLc1y9WGwSsA==", + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/ws": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.1.tgz", + "integrity": "sha512-avvAolBqN3yrSvdBPcJ/0j2g42ABzrv3PEL76e3YTp2WYMGH7cuspkjfSyNWaqYl1J+669dlLp+YFMxSVQyS5g==", + "dependencies": { + "@discordjs/collection": "^1.5.3", + "@discordjs/rest": "^2.0.1", + "@discordjs/util": "^1.0.1", + "@sapphire/async-queue": "^1.5.0", + "@types/ws": "^8.5.5", + "@vladfrangu/async_event_emitter": "^2.2.2", + "discord-api-types": "0.37.50", + "tslib": "^2.6.1", + "ws": "^8.13.0" + }, + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/ws/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==", + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/ws/node_modules/@discordjs/rest": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.0.1.tgz", + "integrity": "sha512-/eWAdDRvwX/rIE2tuQUmKaxmWeHmGealttIzGzlYfI4+a7y9b6ZoMp8BG/jaohs8D8iEnCNYaZiOFLVFLQb8Zg==", + "dependencies": { + "@discordjs/collection": "^1.5.3", + "@discordjs/util": "^1.0.1", + "@sapphire/async-queue": "^1.5.0", + "@sapphire/snowflake": "^3.5.1", + "@vladfrangu/async_event_emitter": "^2.2.2", + "discord-api-types": "0.37.50", + "magic-bytes.js": "^1.0.15", + "tslib": "^2.6.1", + "undici": "5.22.1" + }, + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/ws/node_modules/discord-api-types": { + "version": "0.37.50", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.50.tgz", + "integrity": "sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==" + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "peer": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz", + "integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", - "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dev": true, "peer": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.1", - "globals": "^13.9.0", + "espree": "^9.6.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.49.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.49.0.tgz", + "integrity": "sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==", + "dev": true, + "peer": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", + "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", "dev": true, "peer": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -162,17 +294,17 @@ "peer": true }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", @@ -183,13 +315,51 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@prisma/client": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.3.1.tgz", - "integrity": "sha512-FA0/d1VMJNWqzU7WVWTNWJ+lGOLR9JUBnF73GdIPAEVo/6dWk4gHx0EmgeU+SMv4MZoxgOeTBJF2azhg7x0hMw==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.16.2.tgz", + "integrity": "sha512-qCoEyxv1ZrQ4bKy39GnylE8Zq31IRmm8bNhNbZx7bF2cU5aiCCnSa93J2imF88MBjn7J9eUQneNxUQVJdl/rPQ==", "hasInstallScript": true, "dependencies": { - "@prisma/engines-version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b" + "@prisma/engines-version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81" }, "engines": { "node": ">=14.17" @@ -204,32 +374,32 @@ } }, "node_modules/@prisma/engines-version": { - "version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b.tgz", - "integrity": "sha512-8yWpXkQRmiSfsi2Wb/ZS5D3RFbeu/btL9Pm/gdF4phB0Lo5KGsDFMxFMgaD64mwED2nHc8ZaEJg/+4Jymb9Znw==" + "version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81.tgz", + "integrity": "sha512-q617EUWfRIDTriWADZ4YiWRZXCa/WuhNgLTVd+HqWLffjMSPzyM5uOWoauX91wvQClSKZU4pzI4JJLQ9Kl62Qg==" }, "node_modules/@sapphire/async-queue": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz", - "integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", + "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==", "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" } }, "node_modules/@sapphire/shapeshift": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-2.0.0.tgz", - "integrity": "sha512-SKq4mKZXW2xB6O2Im4lBCDYy8pnuAMC3Zziw5Ub7WvZMt0fgwebDnqh+9MhoMYUSjkLyQcEO8ZS9d3ES7aRhBw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-2.2.0.tgz", + "integrity": "sha512-UEnKgMlQyI0yY/q+lCMX0VJft9y86IsesgbIQj6e62FBYSaMVr+IaMNpi4z45Q14VnuMACbK0yrbHISNqgUYcQ==", "engines": { "node": ">=v15.0.0", "npm": ">=7.0.0" } }, "node_modules/@sapphire/snowflake": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.2.1.tgz", - "integrity": "sha512-vmZq1I6J6iNRQVXP+N9HzOMOY4ORB3MunoFeWCw/aBnZTf1cDgDvP0RZFQS53B1TN95AIgFY9T+ItQ/fWAUYWQ==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz", + "integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==", "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" @@ -246,17 +416,6 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, - "node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dependencies": { - "defer-to-connect": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -273,60 +432,56 @@ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" }, "node_modules/@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==" }, "node_modules/@types/bcryptjs": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.2.tgz", - "integrity": "sha512-LiMQ6EOPob/4yUL66SZzu6Yh77cbzJFYll+ZfaPiPPFswtIlA/Fs1MzdKYA7JApHU49zQTbJGX3PDmCpIdDBRQ==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.4.tgz", + "integrity": "sha512-9wlJI7k5gRyJEC4yrV7DubzNQFTPiykYxUA6lBtsk5NlOfW9oWLJ1HdIA4YtE+6C3i3mTpDQQEosJ2rVZfBWnw==", "dev": true }, "node_modules/@types/node": { - "version": "18.7.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", - "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==" + "version": "20.6.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.1.tgz", + "integrity": "sha512-4LcJvuXQlv4lTHnxwyHQZ3uR9Zw2j7m1C9DfuwoTFQQP4Pmu04O6IfLYgMmHoOCt0nosItLLZAH+sOrRE0Bo8g==" }, "node_modules/@types/node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==", + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.5.tgz", + "integrity": "sha512-OZsUlr2nxvkqUFLSaY2ZbA+P1q22q+KrlxWOn/38RX+u5kTkYL2mTujEpzUhGkS+K/QCYp9oagfXG39XOzyySg==", "dependencies": { "@types/node": "*", - "form-data": "^3.0.0" - } - }, - "node_modules/@types/node-fetch/node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" + "form-data": "^4.0.0" } }, "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.5", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.5.tgz", + "integrity": "sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==", "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==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "bin": { "acorn": "bin/acorn" }, @@ -370,9 +525,9 @@ } }, "node_modules/amazon-cognito-identity-js": { - "version": "5.2.8", - "resolved": "https://registry.npmjs.org/amazon-cognito-identity-js/-/amazon-cognito-identity-js-5.2.8.tgz", - "integrity": "sha512-ikHbIBtdJeXUeHIKFDF+qptRbTX81ZIe+ItvsgjcNXEKuW0ZgjnHw6tgPmOFOweQfUyzW+RpA+T3fG+YqOklbw==", + "version": "5.2.14", + "resolved": "https://registry.npmjs.org/amazon-cognito-identity-js/-/amazon-cognito-identity-js-5.2.14.tgz", + "integrity": "sha512-9LMgLZfbypbbGTpARQ+QqglE09b1MWti11NXhcD/wPom0uhU/L90dfmUOpTwknz//eE6/dGYf004mJucWzrfxQ==", "dependencies": { "buffer": "4.9.2", "crypto-js": "^4.1.1", @@ -381,18 +536,12 @@ "js-cookie": "^2.2.1" } }, - "node_modules/ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dependencies": { - "string-width": "^4.1.0" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -401,6 +550,8 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "peer": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -412,9 +563,9 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -438,7 +589,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/balanced-match": { "version": "1.0.2", @@ -477,27 +628,6 @@ "node": ">=8" } }, - "node_modules/boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "dependencies": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -528,43 +658,15 @@ "isarray": "^1.0.0" } }, - "node_modules/cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" + "streamsearch": "^1.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "engines": { - "node": ">=8" + "node": ">=10.16.0" } }, "node_modules/callsites": { @@ -577,21 +679,12 @@ "node": ">=6" } }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "peer": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -640,34 +733,12 @@ "node": ">= 6" } }, - "node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" - }, - "node_modules/cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dependencies": { - "mimic-response": "^1.0.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "peer": true, "dependencies": { "color-name": "~1.1.4" }, @@ -678,7 +749,9 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "peer": true }, "node_modules/combined-stream": { "version": "1.0.8", @@ -694,23 +767,7 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "node_modules/configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dependencies": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=8" - } + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/create-require": { "version": "1.1.1", @@ -737,18 +794,10 @@ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "engines": { - "node": ">=8" - } - }, "node_modules/data-uri-to-buffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", - "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "engines": { "node": ">= 12" } @@ -769,25 +818,6 @@ } } }, - "node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -795,15 +825,10 @@ "dev": true, "peer": true }, - "node_modules/defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "engines": { "node": ">=0.4.0" } @@ -822,68 +847,91 @@ "integrity": "sha512-gpzXTvFVg7AjKVVJFH0oJGC0q0tO34iJGSHZNz9u3aqLxlD6LfxEs9wWVVikJqn9gra940oUTaPFizCkRDcEiA==" }, "node_modules/discord.js": { - "version": "13.6.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz", - "integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==", - "dependencies": { - "@discordjs/builders": "^0.11.0", - "@discordjs/collection": "^0.4.0", - "@sapphire/async-queue": "^1.1.9", - "@types/node-fetch": "^2.5.12", - "@types/ws": "^8.2.2", - "discord-api-types": "^0.26.0", - "form-data": "^4.0.0", - "node-fetch": "^2.6.1", - "ws": "^8.4.0" + "version": "14.13.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.13.0.tgz", + "integrity": "sha512-Kufdvg7fpyTEwANGy9x7i4od4yu5c6gVddGi5CKm4Y5a6sF0VBODObI3o0Bh7TGCj0LfNT8Qp8z04wnLFzgnbA==", + "dependencies": { + "@discordjs/builders": "^1.6.5", + "@discordjs/collection": "^1.5.3", + "@discordjs/formatters": "^0.3.2", + "@discordjs/rest": "^2.0.1", + "@discordjs/util": "^1.0.1", + "@discordjs/ws": "^1.0.1", + "@sapphire/snowflake": "^3.5.1", + "@types/ws": "^8.5.5", + "discord-api-types": "0.37.50", + "fast-deep-equal": "^3.1.3", + "lodash.snakecase": "^4.1.1", + "tslib": "^2.6.1", + "undici": "5.22.1", + "ws": "^8.13.0" }, "engines": { - "node": ">=16.6.0", - "npm": ">=7.0.0" + "node": ">=16.11.0" } }, "node_modules/discord.js/node_modules/@discordjs/builders": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz", - "integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==", - "dependencies": { - "@sindresorhus/is": "^4.2.0", - "discord-api-types": "^0.26.0", - "ts-mixer": "^6.0.0", - "tslib": "^2.3.1", - "zod": "^3.11.6" + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.5.tgz", + "integrity": "sha512-SdweyCs/+mHj+PNhGLLle7RrRFX9ZAhzynHahMCLqp5Zeq7np7XC6/mgzHc79QoVlQ1zZtOkTTiJpOZu5V8Ufg==", + "dependencies": { + "@discordjs/formatters": "^0.3.2", + "@discordjs/util": "^1.0.1", + "@sapphire/shapeshift": "^3.9.2", + "discord-api-types": "0.37.50", + "fast-deep-equal": "^3.1.3", + "ts-mixer": "^6.0.3", + "tslib": "^2.6.1" }, "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" + "node": ">=16.11.0" } }, - "node_modules/discord.js/node_modules/discord-api-types": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz", - "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==", + "node_modules/discord.js/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==", "engines": { - "node": ">=12" + "node": ">=16.11.0" } }, - "node_modules/discord.js/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "node_modules/discord.js/node_modules/@discordjs/rest": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.0.1.tgz", + "integrity": "sha512-/eWAdDRvwX/rIE2tuQUmKaxmWeHmGealttIzGzlYfI4+a7y9b6ZoMp8BG/jaohs8D8iEnCNYaZiOFLVFLQb8Zg==", "dependencies": { - "whatwg-url": "^5.0.0" + "@discordjs/collection": "^1.5.3", + "@discordjs/util": "^1.0.1", + "@sapphire/async-queue": "^1.5.0", + "@sapphire/snowflake": "^3.5.1", + "@vladfrangu/async_event_emitter": "^2.2.2", + "discord-api-types": "0.37.50", + "magic-bytes.js": "^1.0.15", + "tslib": "^2.6.1", + "undici": "5.22.1" }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" + "node": ">=16.11.0" + } + }, + "node_modules/discord.js/node_modules/@sapphire/shapeshift": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.2.tgz", + "integrity": "sha512-YRbCXWy969oGIdqR/wha62eX8GNHsvyYi0Rfd4rNW6tSVVa8p0ELiMEuOH/k8rgtvRoM+EMV7Csqz77YdwiDpA==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "lodash": "^4.17.21" }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" } }, + "node_modules/discord.js/node_modules/discord-api-types": { + "version": "0.37.50", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.50.tgz", + "integrity": "sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==" + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -897,98 +945,63 @@ "node": ">=6.0.0" } }, - "node_modules/dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dependencies": { - "is-obj": "^2.0.0" - }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "peer": true, "engines": { - "node": ">=8" - } - }, - "node_modules/duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", - "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", + "version": "8.49.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.49.0.tgz", + "integrity": "sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==", "dev": true, "peer": true, "dependencies": { - "@eslint/eslintrc": "^1.2.2", - "@humanwhocodes/config-array": "^0.9.2", - "ajv": "^6.10.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "8.49.0", + "@humanwhocodes/config-array": "^0.11.11", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.6.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" @@ -1001,9 +1014,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", - "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -1013,9 +1026,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "peer": true, "dependencies": { @@ -1024,66 +1037,46 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "peer": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "peer": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/espree": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", - "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "peer": true, "dependencies": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.3.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "peer": true, "dependencies": { @@ -1146,10 +1139,20 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true, "peer": true }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "peer": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fetch-blob": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", @@ -1196,24 +1199,42 @@ "node": ">=8" } }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", + "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", "dev": true, "peer": true, "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.7", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=12.0.0" } }, "node_modules/flatted": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true, "peer": true }, @@ -1244,14 +1265,14 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true, "peer": true }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "hasInstallScript": true, "optional": true, "os": [ @@ -1261,35 +1282,17 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true, - "peer": true - }, - "node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "peer": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -1313,24 +1316,10 @@ "node": ">=10.13.0" } }, - "node_modules/global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "dependencies": { - "ini": "2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globals": { - "version": "13.13.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", - "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "dev": true, "peer": true, "dependencies": { @@ -1343,61 +1332,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/got/node_modules/@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "peer": true }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "peer": true, "engines": { "node": ">=8" } }, - "node_modules/has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" - }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -1418,9 +1369,9 @@ ] }, "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, "peer": true, "engines": { @@ -1430,7 +1381,7 @@ "node_modules/ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=" + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" }, "node_modules/import-fresh": { "version": "3.3.0", @@ -1449,18 +1400,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "engines": { - "node": ">=4" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "peer": true, "engines": { "node": ">=0.8.19" } @@ -1468,7 +1413,7 @@ "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "peer": true, "dependencies": { @@ -1483,14 +1428,6 @@ "dev": true, "peer": true }, - "node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "engines": { - "node": ">=10" - } - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -1502,33 +1439,14 @@ "node": ">=8" } }, - "node_modules/is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dependencies": { - "ci-info": "^2.0.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "engines": { "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -1540,32 +1458,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dependencies": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -1574,41 +1466,25 @@ "node": ">=0.12.0" } }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "engines": { - "node": ">=8" - } - }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "peer": true, "engines": { "node": ">=8" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "node_modules/is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==" - }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true, "peer": true }, @@ -1622,9 +1498,9 @@ } }, "node_modules/isomorphic-unfetch/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -1659,9 +1535,11 @@ } }, "node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "peer": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -1673,27 +1551,18 @@ "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true, "peer": true }, "node_modules/keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dependencies": { - "json-buffer": "3.0.0" - } - }, - "node_modules/latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", + "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "dev": true, + "peer": true, "dependencies": { - "package-json": "^6.3.0" - }, - "engines": { - "node": ">=8" + "json-buffer": "3.0.1" } }, "node_modules/levn": { @@ -1710,53 +1579,43 @@ "node": ">= 0.8.0" } }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "peer": true - }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lru-cache": { + "node_modules/locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "peer": true, "dependencies": { - "yallist": "^4.0.0" + "p-locate": "^5.0.0" }, "engines": { "node": ">=10" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "bin": { - "semver": "bin/semver.js" - } + "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.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "peer": true + }, + "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/magic-bytes.js": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.0.17.tgz", + "integrity": "sha512-PEDpPzHpKe5AxkVmQrNPHFRvPN2ELkkj3eIg4IZO9JdhBiAY3aU53lgYXs9j8B7lpza+QiW0UA4QHCH7EskSeg==" }, "node_modules/make-error": { "version": "1.3.6", @@ -1782,14 +1641,6 @@ "node": ">= 0.6" } }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "engines": { - "node": ">=4" - } - }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1801,11 +1652,6 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -1814,7 +1660,7 @@ "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true, "peer": true }, @@ -1837,9 +1683,9 @@ } }, "node_modules/node-fetch": { - "version": "3.2.10", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", - "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -1854,21 +1700,20 @@ } }, "node_modules/nodemon": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.15.tgz", - "integrity": "sha512-gdHMNx47Gw7b3kWxJV64NI+Q5nfl0y5DgDbiVtShiwa7Z0IZ07Ll4RLFo6AjrhzMtoEZn5PDE3/c2AbVsiCkpA==", - "hasInstallScript": true, + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", "dependencies": { "chokidar": "^3.5.2", "debug": "^3.2.7", "ignore-by-default": "^1.0.1", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "pstree.remy": "^1.1.8", "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", "supports-color": "^5.5.0", "touch": "^3.1.0", - "undefsafe": "^2.0.5", - "update-notifier": "^5.1.0" + "undefsafe": "^2.0.5" }, "bin": { "nodemon": "bin/nodemon.js" @@ -1892,7 +1737,7 @@ "node_modules/nodemon/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { "node": ">=4" } @@ -1911,7 +1756,7 @@ "node_modules/nopt": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", "dependencies": { "abbrev": "1" }, @@ -1930,68 +1775,64 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "engines": { - "node": ">=8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "peer": true, "dependencies": { "wrappy": "1" } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "peer": true, "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "peer": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "peer": true, "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=8" - } - }, - "node_modules/package-json/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "bin": { - "semver": "bin/semver.js" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/parent-module": { @@ -2007,10 +1848,20 @@ "node": ">=6" } }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "peer": true, "engines": { @@ -2048,18 +1899,10 @@ "node": ">= 0.8.0" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "engines": { - "node": ">=4" - } - }, "node_modules/prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -2076,62 +1919,36 @@ "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, "peer": true, "engines": { "node": ">=6" } }, - "node_modules/pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", - "dependencies": { - "escape-goat": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "engines": { - "node": ">=0.10.0" - } + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peer": true }, "node_modules/readdirp": { "version": "3.6.0", @@ -2144,41 +1961,6 @@ "node": ">=8.10.0" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2189,12 +1971,15 @@ "node": ">=4" } }, - "node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dependencies": { - "lowercase-keys": "^1.0.0" + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "peer": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, "node_modules/rimraf": { @@ -2213,31 +1998,36 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peer": true, "dependencies": { - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" + "queue-microtask": "^1.2.2" } }, - "node_modules/semver-diff/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { - "semver": "bin/semver.js" + "semver": "bin/semver" } }, "node_modules/shebang-command": { @@ -2263,28 +2053,39 @@ "node": ">=8" } }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/simple-update-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", + "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "semver": "~7.0.0" }, "engines": { - "node": ">=8" + "node": ">=8.10.0" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" } }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "peer": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -2309,6 +2110,8 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -2319,22 +2122,14 @@ "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true, "peer": true }, "node_modules/tiny-invariant": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.2.0.tgz", - "integrity": "sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg==" - }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "engines": { - "node": ">=6" - } + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", + "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==" }, "node_modules/to-regex-range": { "version": "5.0.1", @@ -2364,9 +2159,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/ts-mixer": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz", - "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg==" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz", + "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==" }, "node_modules/ts-node": { "version": "10.9.1", @@ -2411,9 +2206,9 @@ } }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/type-check": { "version": "0.4.0", @@ -2432,6 +2227,8 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "peer": true, "engines": { "node": ">=10" }, @@ -2439,18 +2236,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", - "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -2464,6 +2253,17 @@ "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" }, + "node_modules/undici": { + "version": "5.22.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz", + "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==", + "dependencies": { + "busboy": "^1.6.0" + }, + "engines": { + "node": ">=14.0" + } + }, "node_modules/unfetch": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", @@ -2477,58 +2277,6 @@ "node": ">=8" } }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "dependencies": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" - } - }, - "node_modules/update-notifier/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -2539,24 +2287,6 @@ "punycode": "^2.1.0" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true, - "peer": true - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -2600,69 +2330,23 @@ "node": ">= 8" } }, - "node_modules/widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dependencies": { - "string-width": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "peer": true }, "node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.1.tgz", + "integrity": "sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -2673,19 +2357,6 @@ } } }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", @@ -2694,1964 +2365,18 @@ "node": ">=6" } }, - "node_modules/zod": { - "version": "3.14.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.14.4.tgz", - "integrity": "sha512-U9BFLb2GO34Sfo9IUYp0w3wJLlmcyGoMd75qU9yf+DrdGA4kEx6e+l9KOkAlyUO0PSQzZCa3TR4qVlcmwqSDuw==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - } - }, - "dependencies": { - "@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "requires": { - "@jridgewell/trace-mapping": "0.3.9" - } - }, - "@discordjs/builders": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.13.0.tgz", - "integrity": "sha512-4L9y26KRNNU8Y7J78SRUN1Uhava9D8jfit/YqEaKi8gQRc7PdqKqk2poybo6RXaiyt/BgKYPfcjxT7WvzGfYCA==", - "requires": { - "@sapphire/shapeshift": "^2.0.0", - "@sindresorhus/is": "^4.6.0", - "discord-api-types": "^0.31.1", - "fast-deep-equal": "^3.1.3", - "ts-mixer": "^6.0.1", - "tslib": "^2.3.1" - } - }, - "@discordjs/collection": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz", - "integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw==" - }, - "@discordjs/rest": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-0.4.1.tgz", - "integrity": "sha512-rtWy+AIfNlfjGkAgA2TJLASdqli07aTNQceVGT6RQQiQaEqV0nsfBO4WtDlDzk7PmO3w+InP3dpwEolJI5jz0A==", - "requires": { - "@discordjs/collection": "^0.7.0-dev", - "@sapphire/async-queue": "^1.3.1", - "@sapphire/snowflake": "^3.2.1", - "@types/node-fetch": "^2.6.1", - "discord-api-types": "^0.29.0", - "form-data": "^4.0.0", - "node-fetch": "^2.6.7", - "tslib": "^2.3.1" - }, - "dependencies": { - "@discordjs/collection": { - "version": "0.7.0-dev.1650672508-3617093", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0-dev.1650672508-3617093.tgz", - "integrity": "sha512-Got8gPiFFEwY0tJo6hK/ZGvg8LFEYMyopchL/l5WjvN5YXDSKqlcSfWk3SqA9F8Eb2ZloauUoXY2B3uMMJUUBA==" - }, - "discord-api-types": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.29.0.tgz", - "integrity": "sha512-Ekq1ICNpOTVajXKZguNFrsDeTmam+ZeA38txsNLZnANdXUjU6QBPIZLUQTC6MzigFGb0Tt8vk4xLnXmzv0shNg==" - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - } - } - }, - "@eslint/eslintrc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", - "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "peer": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.1", - "globals": "^13.9.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - } - }, - "@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", - "dev": true, - "peer": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true, - "peer": true - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" - }, - "@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "@prisma/client": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.3.1.tgz", - "integrity": "sha512-FA0/d1VMJNWqzU7WVWTNWJ+lGOLR9JUBnF73GdIPAEVo/6dWk4gHx0EmgeU+SMv4MZoxgOeTBJF2azhg7x0hMw==", - "requires": { - "@prisma/engines-version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b" - } - }, - "@prisma/engines-version": { - "version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b.tgz", - "integrity": "sha512-8yWpXkQRmiSfsi2Wb/ZS5D3RFbeu/btL9Pm/gdF4phB0Lo5KGsDFMxFMgaD64mwED2nHc8ZaEJg/+4Jymb9Znw==" - }, - "@sapphire/async-queue": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz", - "integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g==" - }, - "@sapphire/shapeshift": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-2.0.0.tgz", - "integrity": "sha512-SKq4mKZXW2xB6O2Im4lBCDYy8pnuAMC3Zziw5Ub7WvZMt0fgwebDnqh+9MhoMYUSjkLyQcEO8ZS9d3ES7aRhBw==" - }, - "@sapphire/snowflake": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.2.1.tgz", - "integrity": "sha512-vmZq1I6J6iNRQVXP+N9HzOMOY4ORB3MunoFeWCw/aBnZTf1cDgDvP0RZFQS53B1TN95AIgFY9T+ItQ/fWAUYWQ==" - }, - "@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==" - }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "requires": { - "defer-to-connect": "^1.0.1" - } - }, - "@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" - }, - "@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" - }, - "@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" - }, - "@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" - }, - "@types/bcryptjs": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.2.tgz", - "integrity": "sha512-LiMQ6EOPob/4yUL66SZzu6Yh77cbzJFYll+ZfaPiPPFswtIlA/Fs1MzdKYA7JApHU49zQTbJGX3PDmCpIdDBRQ==", - "dev": true - }, - "@types/node": { - "version": "18.7.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", - "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==" - }, - "@types/node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==", - "requires": { - "@types/node": "*", - "form-data": "^3.0.0" - }, - "dependencies": { - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - } - } - }, - "@types/ws": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", - "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", - "requires": { - "@types/node": "*" - } - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==" - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peer": true, - "requires": {} - }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "peer": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "amazon-cognito-identity-js": { - "version": "5.2.8", - "resolved": "https://registry.npmjs.org/amazon-cognito-identity-js/-/amazon-cognito-identity-js-5.2.8.tgz", - "integrity": "sha512-ikHbIBtdJeXUeHIKFDF+qptRbTX81ZIe+ItvsgjcNXEKuW0ZgjnHw6tgPmOFOweQfUyzW+RpA+T3fG+YqOklbw==", - "requires": { - "buffer": "4.9.2", - "crypto-js": "^4.1.1", - "fast-base64-decode": "^1.0.0", - "isomorphic-unfetch": "^3.0.0", - "js-cookie": "^2.2.1" - } - }, - "ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "requires": { - "string-width": "^4.1.0" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "peer": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "bcryptjs": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", - "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" - }, - "boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "requires": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "requires": { - "pump": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" - } - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "peer": true - }, - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==" - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" - }, - "cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==" - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "requires": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - } - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "peer": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "crypto-js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", - "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" - }, - "crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==" - }, - "data-uri-to-buffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", - "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==" - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "peer": true - }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" - }, - "discord-api-types": { - "version": "0.31.2", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.31.2.tgz", - "integrity": "sha512-gpzXTvFVg7AjKVVJFH0oJGC0q0tO34iJGSHZNz9u3aqLxlD6LfxEs9wWVVikJqn9gra940oUTaPFizCkRDcEiA==" - }, - "discord.js": { - "version": "13.6.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz", - "integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==", - "requires": { - "@discordjs/builders": "^0.11.0", - "@discordjs/collection": "^0.4.0", - "@sapphire/async-queue": "^1.1.9", - "@types/node-fetch": "^2.5.12", - "@types/ws": "^8.2.2", - "discord-api-types": "^0.26.0", - "form-data": "^4.0.0", - "node-fetch": "^2.6.1", - "ws": "^8.4.0" - }, - "dependencies": { - "@discordjs/builders": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz", - "integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==", - "requires": { - "@sindresorhus/is": "^4.2.0", - "discord-api-types": "^0.26.0", - "ts-mixer": "^6.0.0", - "tslib": "^2.3.1", - "zod": "^3.11.6" - } - }, - "discord-api-types": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz", - "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==" - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - } - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "peer": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "requires": { - "is-obj": "^2.0.0" - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==" - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "peer": true - }, - "eslint": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", - "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", - "dev": true, - "peer": true, - "requires": { - "@eslint/eslintrc": "^1.2.2", - "@humanwhocodes/config-array": "^0.9.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.6.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - } - }, - "eslint-config-prettier": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", - "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", - "dev": true, - "requires": {} - }, - "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "peer": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "peer": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "peer": true - } - } - }, - "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, - "peer": true - }, - "espree": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", - "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", - "dev": true, - "peer": true, - "requires": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.3.0" - } - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "peer": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "peer": true, - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "peer": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "peer": true - }, - "fast-base64-decode": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-base64-decode/-/fast-base64-decode-1.0.0.tgz", - "integrity": "sha512-qwaScUgUGBYeDNRnbc/KyllVU88Jk1pRHPStuF/lO7B0/RTRLj7U0lkdTAutlBblY08rwZDff6tNU9cjv6j//Q==" - }, - "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==" - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "peer": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true, - "peer": true - }, - "fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "requires": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "peer": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "peer": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", - "dev": true, - "peer": true - }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "requires": { - "fetch-blob": "^3.1.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true, - "peer": true - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "optional": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true, - "peer": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "requires": { - "pump": "^3.0.0" - } - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "peer": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "peer": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "requires": { - "ini": "2.0.0" - } - }, - "globals": { - "version": "13.13.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", - "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", - "dev": true, - "peer": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "dependencies": { - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" - } - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==" - }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "peer": true - }, - "ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=" - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "peer": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "peer": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "peer": true - }, - "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==" - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "requires": { - "ci-info": "^2.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "requires": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - } - }, - "is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==" - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" - }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true, - "peer": true - }, - "isomorphic-unfetch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", - "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==", - "requires": { - "node-fetch": "^2.6.1", - "unfetch": "^4.2.0" - }, - "dependencies": { - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - } - } - }, - "js-cookie": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz", - "integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==" - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "peer": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "peer": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true, - "peer": true - }, - "keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "requires": { - "json-buffer": "3.0.0" - } - }, - "latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "requires": { - "package-json": "^6.3.0" - } - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "peer": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "peer": true - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true, - "peer": true - }, - "node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" - }, - "node-fetch": { - "version": "3.2.10", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", - "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", - "requires": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - } - }, - "nodemon": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.15.tgz", - "integrity": "sha512-gdHMNx47Gw7b3kWxJV64NI+Q5nfl0y5DgDbiVtShiwa7Z0IZ07Ll4RLFo6AjrhzMtoEZn5PDE3/c2AbVsiCkpA==", - "requires": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.0.4", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5", - "update-notifier": "^5.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "requires": { - "ms": "^2.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", - "requires": { - "abbrev": "1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, - "normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "peer": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" - }, - "package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "requires": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "peer": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "peer": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "peer": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "peer": true - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" - }, - "prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", - "dev": true - }, - "pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "peer": true - }, - "pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", - "requires": { - "escape-goat": "^2.0.0" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - } - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "requires": { - "picomatch": "^2.2.1" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "peer": true - }, - "registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", - "requires": { - "rc": "^1.2.8" - } - }, - "registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "requires": { - "rc": "^1.2.8" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "peer": true - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "requires": { - "lowercase-keys": "^1.0.0" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "peer": true, - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "peer": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "peer": true - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "peer": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true, - "peer": true - }, - "tiny-invariant": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.2.0.tgz", - "integrity": "sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg==" - }, - "to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, - "touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "requires": { - "nopt": "~1.0.10" - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "ts-mixer": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz", - "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg==" - }, - "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } - }, - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "peer": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "typescript": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", - "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==" - }, - "undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" - }, - "unfetch": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", - "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==" - }, - "unique-names-generator": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/unique-names-generator/-/unique-names-generator-4.7.1.tgz", - "integrity": "sha512-lMx9dX+KRmG8sq6gulYYpKWZc9RlGsgBR6aoO8Qsm3qvkSJ+3rAymr+TnV8EDMrIrwuFJ4kruzMWM/OpYzPoow==" - }, - "unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "requires": { - "crypto-random-string": "^2.0.0" - } - }, - "update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "requires": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" + "engines": { + "node": ">=10" }, - "dependencies": { - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "peer": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "requires": { - "prepend-http": "^2.0.0" - } - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true, - "peer": true - }, - "v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" - }, - "web-streams-polyfill": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "peer": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "requires": { - "string-width": "^4.0.0" - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "peer": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } - }, - "ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", - "requires": {} - }, - "xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" - }, - "zod": { - "version": "3.14.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.14.4.tgz", - "integrity": "sha512-U9BFLb2GO34Sfo9IUYp0w3wJLlmcyGoMd75qU9yf+DrdGA4kEx6e+l9KOkAlyUO0PSQzZCa3TR4qVlcmwqSDuw==" } } } diff --git a/package.json b/package.json index f32932a..b98c406 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "license": "ISC", "devDependencies": { "@types/bcryptjs": "^2.4.2", - "@types/node": "^18.7.18", + "@types/node": "^20.6.1", "eslint-config-prettier": "^8.5.0", "prettier": "^2.6.2", "tslib": "^2.4.0", @@ -28,9 +28,9 @@ "bcryptjs": "^2.4.3", "debug": "^4.3.4", "discord-api-types": "^0.31.2", - "discord.js": "^13.6.0", + "discord.js": "^14.13.0", "node-fetch": "^3.2.10", - "nodemon": "^2.0.15", + "nodemon": "^2.0.22", "tiny-invariant": "^1.2.0", "ts-node": "^10.9.1", "unique-names-generator": "^4.7.1" diff --git a/src/api/gpt.ts b/src/api/gpt.ts new file mode 100644 index 0000000..366aacb --- /dev/null +++ b/src/api/gpt.ts @@ -0,0 +1,66 @@ +import https from "https"; +import { CHATGPT_API_KEY } from "../../config"; + +class ChatGPTHandler { + private messageContent: string; + private responseMessage: string; + private reqOptions; + + constructor() { + this.reqOptions = { + hostname: "api.openai.com", + path: "/v1/chat/completions", + method: "POST", + headers: { + "content-type": "application/json", + Authorization: `Bearer ${CHATGPT_API_KEY}`, + }, + }; + this.messageContent = ""; + this.responseMessage = ""; + } + + setMessage(message: string) { + this.messageContent = message; + } + + async handleRequest() { + const request = https.request(this.reqOptions, (req) => { + let data = ""; + + req.on("connect", (connection) => { + console.log("OPENAI CONNECTION: ", connection); + }); + + req.on("data", (chunk) => { + data += chunk; + }); + + req.on("end", async () => { + const response = JSON.parse(data); + console.log(response.choices[0].message.content); + this.responseMessage = await response.choices[0].message.content; + }); + + req.on("error", (error) => { + console.log("error", error); + }); + }); + + const postData = JSON.stringify({ + model: "gpt-3.5-turbo", + messages: [{ role: "user", content: this.messageContent }], + temperature: 0.7, + }); + + request.write(postData); + + request.end(); + } + + handleResponse(): string { + return this.responseMessage; + } +} + +const chatgptHandler = new ChatGPTHandler(); diff --git a/src/commands/login.ts b/src/commands/login.ts new file mode 100644 index 0000000..2a2f21f --- /dev/null +++ b/src/commands/login.ts @@ -0,0 +1,39 @@ +import { + ActionRowBuilder, + ButtonBuilder, + ButtonStyle, + CommandInteraction, + SlashCommandBuilder, +} from "discord.js"; +import { NEXTAUTH_URL } from "../../config"; + +const login = { + data: new SlashCommandBuilder() + .setName("login") + .setDescription("kampus hesabina giris yapmak icin kullanilir"), + async execute(interaction: CommandInteraction) { + const github = new ButtonBuilder() + .setLabel("Sign in with GitHub") + .setURL(`${NEXTAUTH_URL}/signin/github`) + .setStyle(ButtonStyle.Link); + + const discord = new ButtonBuilder() + .setLabel("Sign in with Discord") + .setURL(`${NEXTAUTH_URL}/signin/discord`) + .setStyle(ButtonStyle.Link); + + const twitch = new ButtonBuilder() + .setLabel("Sign in with Twitch") + .setURL(`${NEXTAUTH_URL}/signin/twitch`) + .setStyle(ButtonStyle.Link); + + const row = new ActionRowBuilder().addComponents(github, discord, twitch); + + await interaction.reply({ + content: `Please select which action you would like to take.`, + components: [row], + }); + }, +}; + +export default login; diff --git a/src/commands/signup.ts b/src/commands/unused/signup.ts similarity index 51% rename from src/commands/signup.ts rename to src/commands/unused/signup.ts index a3ec6f5..0e83bf3 100644 --- a/src/commands/signup.ts +++ b/src/commands/unused/signup.ts @@ -1,11 +1,10 @@ import { bold, SlashCommandBuilder, spoiler } from "@discordjs/builders"; -import { signUp } from "../handlers/sign-up"; -import { sendWithDefer } from "../../sendWithDefer"; +import { sendWithDefer } from "../../../sendWithDefer"; const usernameOption = "kullanici-adi"; const emailOption = "e-posta"; -const signup = { +export const signup = { data: new SlashCommandBuilder() .setName("uye-ol") .setDescription("pano.kamp.us'a üye olmak için kullanılır") @@ -26,23 +25,15 @@ const signup = { const username = interaction.options.getString(usernameOption); const loginUrl = "https://pano.kamp.us/login"; - const { data, errors } = await signUp(username, email); - - if (errors) { - await sendWithDefer(interaction, 4000, errors); - } else { - await sendWithDefer( - interaction, - 2000, - `${username} ismiyle kayıt oldun` + - `\nHesabının şifresi -> ${spoiler(data.password)} <- olarak ayarlandı` + - `\n-----------------------------------------------------------` + - `\n/yardim komutunu çalıstırarak bütün komutları görebilirsin` + - `\nhttps://pano.kamp.us/login adresinden giriş yaptıktan sonra şifreni değiştirmeni öneririz` + - `\n:tada::tada: ${bold(loginUrl)} :tada::tada:` - ); - } + await sendWithDefer( + interaction, + 2000, + `${username} ismiyle kayıt oldun` + + `\nHesabının şifresi -> ${spoiler("hehehhe")} <- olarak ayarlandı` + + `\n-----------------------------------------------------------` + + `\n/yardim komutunu çalıstırarak bütün komutları görebilirsin` + + `\nhttps://pano.kamp.us/login adresinden giriş yaptıktan sonra şifreni değiştirmeni öneririz` + + `\n:tada::tada: ${bold(loginUrl)} :tada::tada:` + ); }, }; - -export default signup; diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts new file mode 100644 index 0000000..c83a7c5 --- /dev/null +++ b/src/events/interactionCreate.ts @@ -0,0 +1,22 @@ +const interactionCreate = { + name: "interactionCreate", + async execute(interaction) { + if (!interaction.isCommand()) return; + + const command = interaction.client.commands.get(interaction.commandName); + + if (!command) return; + + try { + await command.execute(interaction); + } catch (error) { + console.error(error); + await interaction.reply({ + content: "There was an error while executing this command!", + ephemeral: true, + }); + } + }, +}; + +export default interactionCreate; diff --git a/src/handlers/sign-up.ts b/src/features/kampus-sign-up.ts similarity index 80% rename from src/handlers/sign-up.ts rename to src/features/kampus-sign-up.ts index 6f5b4e2..86577ba 100644 --- a/src/handlers/sign-up.ts +++ b/src/features/kampus-sign-up.ts @@ -1,5 +1,4 @@ import fetch, { FormData } from "node-fetch"; -import { generatePassword, validateEmail, validateUsername } from "../utils"; const Error = (message: string) => { return { errors: message, data: { user: {}, password: "" } }; @@ -19,13 +18,6 @@ function isEmpty(obj) { } export const signUp = async (username: string, email: string) => { - if (!validateUsername(username)) { - return Error("Username is invalid"); - } - if (!validateEmail(email)) { - return Error("Email is invalid"); - } - // const existingUserByEmail = await getUserByEmail(prisma, email); // const existingUserByUsername = await getUserByUsername(prisma, username); // if (existingUserByEmail) { @@ -35,11 +27,9 @@ export const signUp = async (username: string, email: string) => { // return Error("This username is taken"); // } - const password = generatePassword(); const form = new FormData(); form.append("username", username); form.append("email", email); - form.append("password", password); try { const url = "https://pano.kamp.us/api/auth/register"; @@ -53,7 +43,7 @@ export const signUp = async (username: string, email: string) => { const errorMessage = getErrorMessage(user.errors); return Error(errorMessage); } else { - return { errors: "", data: { user: user.data, password } }; + return { errors: "", data: { user: user.data } }; } } catch (e) { return Error(`Error: ${e}`); diff --git a/src/handlers/command.handler.ts b/src/handlers/command.handler.ts new file mode 100644 index 0000000..0b19359 --- /dev/null +++ b/src/handlers/command.handler.ts @@ -0,0 +1,26 @@ +import { readdirSync, realpathSync } from "fs"; +import { join } from "path"; +import { DiscordClient } from "../../createDiscordClient"; + +const dirname = realpathSync("."); +export default async (client: DiscordClient) => { + console.log("INITIALIZING COMMAND HANDLER"); + + const commandsPath = join(dirname, "/src/commands"); + console.log(commandsPath); + const commandFiles = readdirSync(commandsPath).filter((file: any) => file.endsWith(".ts")); + + for (const file of commandFiles) { + const filePath = join(commandsPath, file); + const command = await import(filePath); + + if (command.default.data) { + client.commands.set(command.default.data.name, command.default); + console.log("[✅ SUCCESS]", file, "command file loaded."); + } else { + console.log("[❌ ERROR]", file, "command file is not loaded."); + } + } + + console.log("COMMANDS ARE READY!\n"); +}; diff --git a/src/handlers/event.handler.ts b/src/handlers/event.handler.ts new file mode 100644 index 0000000..25c823b --- /dev/null +++ b/src/handlers/event.handler.ts @@ -0,0 +1,29 @@ +import { readdirSync, realpathSync } from "fs"; +import { join } from "path"; +import { DiscordClient } from "../../createDiscordClient"; + +const dirname = realpathSync("."); +export default async (client: DiscordClient) => { + console.log("INITIALIZING EVENT HANDLER"); + + const eventsPath = join(dirname, "src/events"); + const eventFiles = readdirSync(eventsPath).filter((file) => file.endsWith(".ts")); + + for (const file of eventFiles) { + const filePath = join(eventsPath, file); + const event = await import(filePath); + + if (event.default) { + if (event.default.once) { + client.once(event.default.name, (...args: any[]) => event.default.execute(...args)); + } else { + client.on(event.default.name, (...args: any[]) => event.default.execute(...args, client)); + } + console.log("[✅ SUCCESS]", file, "event file loaded."); + } else { + console.log("[❌ ERROR]", file, "event file is not loaded."); + } + } + + console.log("EVENTS ARE READY!"); +}; diff --git a/src/utils.ts b/src/utils.ts deleted file mode 100644 index 32f2c23..0000000 --- a/src/utils.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { adjectives, animals, colors, uniqueNamesGenerator } from "unique-names-generator"; - -export function validateEmail(email: unknown): email is string { - return typeof email === "string" && email.length > 3 && email.includes("@"); -} -export function validateUsername(username: unknown): username is string { - return typeof username === "string" && username.length >= 2; -} -export function validatePassword(password: unknown): password is string { - return typeof password === "string" && password.length > 8; -} -export function generatePassword() { - return uniqueNamesGenerator({ dictionaries: [adjectives, colors, animals] }); -} diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 0000000..b41eefc --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1,39 @@ +import { DiscordClient } from "../../createDiscordClient"; +import path from "path"; +import { fileURLToPath } from "url"; +import { NEXTAUTH_URL } from "../../config"; + +export const isUserInThisGuild = async (client: DiscordClient, userID: string, guildID: string) => { + const guild = await client.guilds.fetch(guildID); + + try { + await guild.members.fetch(userID); + return true; + } catch (error) { + return false; + } +}; + +export const getDirName = function (moduleUrl) { + const filename = fileURLToPath(moduleUrl); + return path.dirname(filename); +}; + +export const getSession = async () => { + // const headers = new Headers(request.headers); + try { + // const cookie = headers.get("cookie"); + const session = await fetch(`${NEXTAUTH_URL}/session`, { + method: "GET", + headers: { + // cookie: cookie || "", + cookie: "", + }, + }).then((res) => res.json()); + + return session; + } catch (e) { + // handle error for session request fails + return null; + } +}; diff --git a/tsconfig.json b/tsconfig.json index 1342302..3fcd6fa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2022", + "target": "esnext", "lib": ["ES2022"], "allowJs": true, "skipLibCheck": true, @@ -14,7 +14,8 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "noImplicitAny": false + "noImplicitAny": false, + "types": ["node"] }, "exclude": [ "node_modules", From 1b080a68de35a06315421f564833e16bf68ac53f Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Mon, 20 Nov 2023 23:23:41 -0800 Subject: [PATCH 04/29] add read cmd --- src/commands/read-all-messages.ts | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/commands/read-all-messages.ts diff --git a/src/commands/read-all-messages.ts b/src/commands/read-all-messages.ts new file mode 100644 index 0000000..df00566 --- /dev/null +++ b/src/commands/read-all-messages.ts @@ -0,0 +1,60 @@ +import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js"; +import { setTimeout } from "timers/promises"; +import { writeFile } from "fs"; + +async function fetchMessages(client, channelID, N_DAYS_AGO = 7) { + const channel = (await client.channels.fetch(channelID)) as TextChannel; // Replace with your channel ID + const endTime = Date.now() - N_DAYS_AGO * 24 * 60 * 60 * 1000; + + let lastId: string | undefined; + let count = 0; + + while (true) { + const messages = await channel.messages.fetch({ + limit: 100, // Adjust as needed + before: lastId, + }); + const filteredMessages = messages.filter((m) => m.createdTimestamp > endTime); + const allMessages = {}; + + // Process the messages here + filteredMessages.forEach((message) => { + allMessages[message.author.tag] = { content: message.content, uid: message.author.id }; + }); + const timestamp = filteredMessages.last()?.createdTimestamp as number; + + if (filteredMessages.size < 100 || messages.size === 0 || timestamp <= endTime) { + break; + } + + // Save the ID of the last message to paginate + count += filteredMessages.size; + lastId = filteredMessages.last()?.id; + + // To handle rate limits, wait before making a new request + await setTimeout(1000); + + writeFile(`${count}` + ".json", JSON.stringify(allMessages), (err) => { + if (err) { + console.log(err); + } else { + console.log("File written successfully\n"); + } + }); + } + + console.log("Finished fetching messages."); +} + +const getMessages = { + data: new SlashCommandBuilder() + .setName("get-messages") + .setDescription("Fetches messages from a channel"), + async execute(interaction: CommandInteraction) { + const client = interaction.client; + const channelID = "1158288028511522877"; + const messages = await fetchMessages(client, channelID); + }, +}; + +export default getMessages; From 97ce0e724c5336fe39bc875c208a7137e8c88f3f Mon Sep 17 00:00:00 2001 From: Can Sirin <8138047+cansirin@users.noreply.github.com> Date: Tue, 21 Nov 2023 00:06:16 -0800 Subject: [PATCH 05/29] ignore config.ts --- .gitignore | 1 + config.example.ts | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 config.example.ts diff --git a/.gitignore b/.gitignore index 9765d1c..1678d03 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea node_modules .DS_Store +config.ts \ No newline at end of file diff --git a/config.example.ts b/config.example.ts new file mode 100644 index 0000000..b1102a9 --- /dev/null +++ b/config.example.ts @@ -0,0 +1,6 @@ +export const GUILD_ID = "guildID"; +export const CLIENT_ID = "clientID"; +export const DISCORD_TOKEN = "discordToken"; + +export const NEXTAUTH_URL = ""; +export const CHATGPT_API_KEY = ""; From f6cf03936dded2495c3dcc2ad7ee1069c09ad420 Mon Sep 17 00:00:00 2001 From: Can Sirin <8138047+cansirin@users.noreply.github.com> Date: Tue, 21 Nov 2023 21:18:26 -0800 Subject: [PATCH 06/29] add get-all-members --- src/commands/get-all-members.ts | 55 ++++++++++++++++++++++ src/commands/read-all-messages.ts | 78 ++++++++++++++++++++----------- src/utils/index.ts | 26 +++++++++++ 3 files changed, 132 insertions(+), 27 deletions(-) create mode 100644 src/commands/get-all-members.ts diff --git a/src/commands/get-all-members.ts b/src/commands/get-all-members.ts new file mode 100644 index 0000000..674b80f --- /dev/null +++ b/src/commands/get-all-members.ts @@ -0,0 +1,55 @@ +import { Client, CommandInteraction, SlashCommandBuilder } from "discord.js"; +import { writeFile } from "fs"; +import { GUILD_ID } from "../../config"; + +type Member = { + username: string; + uid: string; + joinedAt?: string; +}; + +export async function fetchAllMembers(client: Client, guildID: string) { + const guild = client.guilds.cache.get(guildID); // Replace with your guild ID + if (!guild) return console.error("Guild not found."); + let membersCollected: Member[] = []; + + try { + // Fetching all members + await guild.members.fetch(); + + guild.members.cache.forEach((member) => { + membersCollected.push({ + username: member.user.username, + uid: member.user.id, + }); + }); + console.log("Finished fetching members. Total members:", membersCollected.length); + writeToFile(membersCollected); + } catch (error) { + console.error("Error fetching members:", error); + } +} + +async function writeToFile(members: any) { + const fileName = `members_${new Date().toUTCString()}${Object.keys(members).length}.json`; + writeFile(fileName, JSON.stringify(members, null, 2), (err) => { + if (err) { + console.error("Error writing file:", err); + } else { + console.log("Messages saved to messages.json"); + } + }); +} + +const getAllMembers = { + data: new SlashCommandBuilder() + .setName("get-members") + .setDescription("Fetches all members of the guild"), + async execute(interaction: CommandInteraction) { + const client = interaction.client; + const channelID = "1158288028511522877"; + const members = await fetchAllMembers(client, GUILD_ID); + }, +}; + +export default getAllMembers; diff --git a/src/commands/read-all-messages.ts b/src/commands/read-all-messages.ts index df00566..034ad3e 100644 --- a/src/commands/read-all-messages.ts +++ b/src/commands/read-all-messages.ts @@ -1,51 +1,75 @@ -import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js"; +import { Client, CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js"; import { setTimeout } from "timers/promises"; import { writeFile } from "fs"; +import { formatDate } from "../utils"; -async function fetchMessages(client, channelID, N_DAYS_AGO = 7) { +type Message = { + author: string; + content: string; + uid: string; + createdAt: string; +}; + +async function fetchMessages(client: Client, channelID: string, N_DAYS_AGO = 7) { const channel = (await client.channels.fetch(channelID)) as TextChannel; // Replace with your channel ID - const endTime = Date.now() - N_DAYS_AGO * 24 * 60 * 60 * 1000; + const today = new Date(); + const endDate = new Date(today.getTime() - N_DAYS_AGO * 24 * 60 * 60 * 1000); + endDate.setHours(0, 0, 0, 0); + const endTime = endDate.getTime(); let lastId: string | undefined; - let count = 0; + let messagesCollected: Message[] = []; while (true) { const messages = await channel.messages.fetch({ - limit: 100, // Adjust as needed + limit: 100, before: lastId, }); - const filteredMessages = messages.filter((m) => m.createdTimestamp > endTime); - const allMessages = {}; - - // Process the messages here - filteredMessages.forEach((message) => { - allMessages[message.author.tag] = { content: message.content, uid: message.author.id }; - }); - const timestamp = filteredMessages.last()?.createdTimestamp as number; - if (filteredMessages.size < 100 || messages.size === 0 || timestamp <= endTime) { + // Stop if no more messages are retrieved + if (messages.size === 0) { + console.log("No more messages to fetch."); break; } - // Save the ID of the last message to paginate - count += filteredMessages.size; - lastId = filteredMessages.last()?.id; + // Filter and collect messages + const filteredMessages = messages.filter((m) => m.createdTimestamp > endTime); + filteredMessages.toJSON().forEach((m) => + messagesCollected.push({ + author: m.author.username, + content: m.content, + uid: m.author.id, + createdAt: formatDate(m.createdTimestamp), + }) + ); + + // Break if no messages in the current fetch are within the time range + if (filteredMessages.size === 0) { + writeToFile(messagesCollected); + return messagesCollected; + } - // To handle rate limits, wait before making a new request - await setTimeout(1000); + // Update lastId for the next iteration + lastId = messages.lastKey(); + console.log(messagesCollected.length, "messages collected so far."); - writeFile(`${count}` + ".json", JSON.stringify(allMessages), (err) => { - if (err) { - console.log(err); - } else { - console.log("File written successfully\n"); - } - }); + await setTimeout(1000); // Respect rate limits } console.log("Finished fetching messages."); } +async function writeToFile(messages: any) { + const fileName = `messages_${new Date().toUTCString()}${Object.keys(messages).length}.json`; + writeFile(fileName, JSON.stringify(messages, null, 2), (err) => { + if (err) { + console.error("Error writing file:", err); + } else { + console.log("Messages saved to messages.json"); + } + }); +} + const getMessages = { data: new SlashCommandBuilder() .setName("get-messages") @@ -53,7 +77,7 @@ const getMessages = { async execute(interaction: CommandInteraction) { const client = interaction.client; const channelID = "1158288028511522877"; - const messages = await fetchMessages(client, channelID); + const messages = await fetchMessages(client, channelID, 7); }, }; diff --git a/src/utils/index.ts b/src/utils/index.ts index b41eefc..1cdc92f 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -37,3 +37,29 @@ export const getSession = async () => { return null; } }; + +export function formatDate(date: Date | number | string) { + if (!(date instanceof Date)) date = new Date(date); + const days = date.getDate().toString().padStart(2, "0"); // Add leading zero if needed + const months = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + ]; + const monthName = months[date.getMonth()]; + const year = date.getFullYear(); + const hours = date.getHours().toString().padStart(2, "0"); + const minutes = date.getMinutes().toString().padStart(2, "0"); + const seconds = date.getSeconds().toString().padStart(2, "0"); + + return `${days} ${monthName} ${year}, ${hours}:${minutes}:${seconds}`; +} From e55cdb5d19f90df3533191292807b06cff820f4e Mon Sep 17 00:00:00 2001 From: Can Sirin <8138047+cansirin@users.noreply.github.com> Date: Wed, 22 Nov 2023 00:32:51 -0800 Subject: [PATCH 07/29] build & fix things --- createDiscordClient.ts | 5 +++- index.ts | 4 +--- src/commands/assign-role.ts | 40 +++++++++++++++++++++++++++++++ src/commands/get-all-members.ts | 9 ++++--- src/commands/read-all-messages.ts | 14 +++++++---- src/events/messageCreate.ts | 25 +++++++++++++++++++ src/utils/constants.ts | 1 + 7 files changed, 87 insertions(+), 11 deletions(-) create mode 100644 src/commands/assign-role.ts create mode 100644 src/events/messageCreate.ts create mode 100644 src/utils/constants.ts diff --git a/createDiscordClient.ts b/createDiscordClient.ts index b5558bf..e12a99c 100644 --- a/createDiscordClient.ts +++ b/createDiscordClient.ts @@ -6,7 +6,7 @@ export interface DiscordClient extends Client { commands: Collection; } -export const createDiscordClient = async () => { +const createDiscordClient = async () => { const client = new Client({ intents: [ GatewayIntentBits.Guilds, @@ -22,6 +22,7 @@ export const createDiscordClient = async () => { GatewayIntentBits.DirectMessageReactions, GatewayIntentBits.DirectMessageTyping, GatewayIntentBits.MessageContent, + GatewayIntentBits.GuildModeration, ], partials: [ Partials.Message, @@ -55,3 +56,5 @@ export const createDiscordClient = async () => { return client; }; + +export const client = await createDiscordClient(); diff --git a/index.ts b/index.ts index 24afa9c..fe03a2f 100644 --- a/index.ts +++ b/index.ts @@ -1,7 +1,5 @@ import { DISCORD_TOKEN } from "./config"; -import { createDiscordClient } from "./createDiscordClient"; - -const client = await createDiscordClient(); +import { client } from "./createDiscordClient"; // Login to Discord with your client's token client.login(DISCORD_TOKEN).then(() => { diff --git a/src/commands/assign-role.ts b/src/commands/assign-role.ts new file mode 100644 index 0000000..a348dfd --- /dev/null +++ b/src/commands/assign-role.ts @@ -0,0 +1,40 @@ +import { Client, CommandInteraction, SlashCommandBuilder } from "discord.js"; +import members from "../../grouped.json"; + +export async function assignRole(client: Client, guildID: string, userID: string) { + const guild = client.guilds.cache.get(guildID); // Replace with your guild ID + if (!guild) return console.error("Guild not found."); + + try { + const role = guild.roles.cache.find((r) => r.name === "v2"); // Replace with the role name + if (!role) return console.error("Role not found."); + + const member = guild.members.cache.get(userID); // Replace with the user's ID + if (!member) return console.error("Member not found.", userID); + + await member.roles.add(role); + console.log(`Role ${role.name} added to ${member.user.tag}`); + } catch (error) { + console.error("Error assigning role:", error); + } +} + +const assignRoleCommand = { + data: new SlashCommandBuilder() + .setName("assign-role") + .setDescription("Assignes a role to a user"), + async execute(interaction: CommandInteraction) { + const client = interaction.client; + const guildID = interaction.guildId; + if (guildID === null) return console.error("Guild ID is null."); + + for (const member of Object.keys(members)) { + await assignRole(client, guildID, member); + } + + console.log("Assigned roles so far: ", Object.keys(members).length); + console.log("Finished assigning roles."); + }, +}; + +export default assignRoleCommand; diff --git a/src/commands/get-all-members.ts b/src/commands/get-all-members.ts index 674b80f..e8d5979 100644 --- a/src/commands/get-all-members.ts +++ b/src/commands/get-all-members.ts @@ -1,11 +1,11 @@ import { Client, CommandInteraction, SlashCommandBuilder } from "discord.js"; import { writeFile } from "fs"; -import { GUILD_ID } from "../../config"; type Member = { username: string; uid: string; joinedAt?: string; + roles: string[]; }; export async function fetchAllMembers(client: Client, guildID: string) { @@ -21,6 +21,7 @@ export async function fetchAllMembers(client: Client, guildID: string) { membersCollected.push({ username: member.user.username, uid: member.user.id, + roles: member.roles.cache.map((role) => role.name), }); }); console.log("Finished fetching members. Total members:", membersCollected.length); @@ -47,8 +48,10 @@ const getAllMembers = { .setDescription("Fetches all members of the guild"), async execute(interaction: CommandInteraction) { const client = interaction.client; - const channelID = "1158288028511522877"; - const members = await fetchAllMembers(client, GUILD_ID); + const guildID = interaction.guildId; + if (guildID === null) return console.error("Guild ID is null."); + + const members = await fetchAllMembers(client, guildID); }, }; diff --git a/src/commands/read-all-messages.ts b/src/commands/read-all-messages.ts index 034ad3e..29c305c 100644 --- a/src/commands/read-all-messages.ts +++ b/src/commands/read-all-messages.ts @@ -2,6 +2,8 @@ import { Client, CommandInteraction, SlashCommandBuilder, TextChannel } from "di import { setTimeout } from "timers/promises"; import { writeFile } from "fs"; import { formatDate } from "../utils"; +import _ from "lodash"; +import { GUNAYDIN_CHANNEL_ID } from "../utils/constants"; type Message = { author: string; @@ -46,6 +48,8 @@ async function fetchMessages(client: Client, channelID: string, N_DAYS_AGO = 7) // Break if no messages in the current fetch are within the time range if (filteredMessages.size === 0) { writeToFile(messagesCollected); + const grouped = _.groupBy(messagesCollected, "uid"); + writeToFile(grouped, "grouped.json"); return messagesCollected; } @@ -59,8 +63,10 @@ async function fetchMessages(client: Client, channelID: string, N_DAYS_AGO = 7) console.log("Finished fetching messages."); } -async function writeToFile(messages: any) { - const fileName = `messages_${new Date().toUTCString()}${Object.keys(messages).length}.json`; +async function writeToFile( + messages: any, + fileName = `messages_${new Date().toUTCString()}${Object.keys(messages).length}.json` +) { writeFile(fileName, JSON.stringify(messages, null, 2), (err) => { if (err) { console.error("Error writing file:", err); @@ -76,8 +82,8 @@ const getMessages = { .setDescription("Fetches messages from a channel"), async execute(interaction: CommandInteraction) { const client = interaction.client; - const channelID = "1158288028511522877"; - const messages = await fetchMessages(client, channelID, 7); + const channelID = GUNAYDIN_CHANNEL_ID; + const messages = await fetchMessages(client, channelID, 14); }, }; diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts new file mode 100644 index 0000000..7df1817 --- /dev/null +++ b/src/events/messageCreate.ts @@ -0,0 +1,25 @@ +import { Events, Message } from "discord.js"; +import { assignRole } from "../commands/assign-role"; +import { GUNAYDIN_CHANNEL_ID } from "../utils/constants"; + +const messageCreateInGunaydinChannel = { + name: Events.MessageCreate, + async execute(message: Message) { + const client = message.client; + const guildID = message.guild?.id; + if (!guildID) return console.error("Guild ID is null."); + + if (message.channel.id === GUNAYDIN_CHANNEL_ID) { + const userRoles = message.member?.roles.cache.map((role) => role.name); + + // if user has v2 role, do nothing + if (userRoles?.includes("v2")) { + return; + } + + assignRole(client, guildID, message.author.id); + } + }, +}; + +export default messageCreateInGunaydinChannel; diff --git a/src/utils/constants.ts b/src/utils/constants.ts new file mode 100644 index 0000000..de5e822 --- /dev/null +++ b/src/utils/constants.ts @@ -0,0 +1 @@ +export const GUNAYDIN_CHANNEL_ID = "1158288028511522877"; From 71929ccbede10ce14a571f0f471e7b166f2de705 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Sat, 25 Nov 2023 20:47:09 -0800 Subject: [PATCH 08/29] update env variables --- .env.example | 3 +++ .gitignore | 3 ++- config.example.ts | 6 ----- config.ts | 9 +------- deploy-commands.ts | 6 +++-- index.ts | 4 ++-- package-lock.json | 12 ++++++++++ package.json | 1 + src/api/gpt.ts | 3 +-- src/commands/get-all-members.ts | 8 +++++-- src/commands/login.ts | 39 --------------------------------- src/utils/index.ts | 20 ----------------- 12 files changed, 32 insertions(+), 82 deletions(-) create mode 100644 .env.example delete mode 100644 config.example.ts delete mode 100644 src/commands/login.ts diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..00003e6 --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +CLIENT_ID=967524936551895051 +DISCORD_TOKEN=OTY3NTI0OTM2NTUxODk1MDUx.GKNC0b.el6R45Roys1V7IBPahAYwaKzgu-6QYOvYQQO4g +CHATGPT_API_KEY=get-your-chatgpt-key diff --git a/.gitignore b/.gitignore index 1678d03..6eeda0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea node_modules .DS_Store -config.ts \ No newline at end of file +config.ts +.env diff --git a/config.example.ts b/config.example.ts deleted file mode 100644 index b1102a9..0000000 --- a/config.example.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const GUILD_ID = "guildID"; -export const CLIENT_ID = "clientID"; -export const DISCORD_TOKEN = "discordToken"; - -export const NEXTAUTH_URL = ""; -export const CHATGPT_API_KEY = ""; diff --git a/config.ts b/config.ts index 322752c..9e93458 100644 --- a/config.ts +++ b/config.ts @@ -1,8 +1 @@ -export const GUILD_ID = "717812863414042624"; -export const CLIENT_ID = "967524936551895051"; -export const DISCORD_TOKEN = - "OTY3NTI0OTM2NTUxODk1MDUx.GKNC0b.el6R45Roys1V7IBPahAYwaKzgu-6QYOvYQQO4g"; - -export const NEXTAUTH_URL = "http://pasaport.localhost.kamp.us:3001/auth"; - -export const CHATGPT_API_KEY = ""; +export const KAMPUS_GUILD_ID = "717812863414042624"; diff --git a/deploy-commands.ts b/deploy-commands.ts index cec0d56..2039fa3 100644 --- a/deploy-commands.ts +++ b/deploy-commands.ts @@ -1,6 +1,6 @@ import { REST, Routes } from "discord.js"; import { readdirSync } from "fs"; -import { CLIENT_ID, DISCORD_TOKEN, GUILD_ID } from "./config"; +import { CLIENT_ID, DISCORD_TOKEN, KAMPUS_GUILD_ID } from "./config"; const commands: any[] = []; const commandFiles = readdirSync("./src/commands").filter((file) => file.endsWith(".ts")); @@ -19,7 +19,9 @@ const rest = new REST({ version: "10" }).setToken(DISCORD_TOKEN); console.log("Started refreshing application (/) commands."); if (env === "production") { console.log("Started refreshing guild (/) commands."); - await rest.put(Routes.applicationGuildCommands(CLIENT_ID, GUILD_ID), { body: commands }); + await rest.put(Routes.applicationGuildCommands(CLIENT_ID, KAMPUS_GUILD_ID), { + body: commands, + }); } await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands }); diff --git a/index.ts b/index.ts index fe03a2f..78677f5 100644 --- a/index.ts +++ b/index.ts @@ -1,7 +1,7 @@ -import { DISCORD_TOKEN } from "./config"; import { client } from "./createDiscordClient"; +import "dotenv/config"; // Login to Discord with your client's token -client.login(DISCORD_TOKEN).then(() => { +client.login(process.env.DISCORD_TOKEN).then(() => { console.log("Logged in!"); }); diff --git a/package-lock.json b/package-lock.json index aac44b8..8cead6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "debug": "^4.3.4", "discord-api-types": "^0.31.2", "discord.js": "^14.13.0", + "dotenv": "^16.3.1", "node-fetch": "^3.2.10", "nodemon": "^2.0.22", "tiny-invariant": "^1.2.0", @@ -945,6 +946,17 @@ "node": ">=6.0.0" } }, + "node_modules/dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", diff --git a/package.json b/package.json index b98c406..51aab7d 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "debug": "^4.3.4", "discord-api-types": "^0.31.2", "discord.js": "^14.13.0", + "dotenv": "^16.3.1", "node-fetch": "^3.2.10", "nodemon": "^2.0.22", "tiny-invariant": "^1.2.0", diff --git a/src/api/gpt.ts b/src/api/gpt.ts index 366aacb..239b5b1 100644 --- a/src/api/gpt.ts +++ b/src/api/gpt.ts @@ -1,5 +1,4 @@ import https from "https"; -import { CHATGPT_API_KEY } from "../../config"; class ChatGPTHandler { private messageContent: string; @@ -13,7 +12,7 @@ class ChatGPTHandler { method: "POST", headers: { "content-type": "application/json", - Authorization: `Bearer ${CHATGPT_API_KEY}`, + Authorization: `Bearer ${process.env.CHATGPT_API_KEY}`, }, }; this.messageContent = ""; diff --git a/src/commands/get-all-members.ts b/src/commands/get-all-members.ts index e8d5979..88a179f 100644 --- a/src/commands/get-all-members.ts +++ b/src/commands/get-all-members.ts @@ -1,5 +1,6 @@ import { Client, CommandInteraction, SlashCommandBuilder } from "discord.js"; import { writeFile } from "fs"; +import * as _ from "lodash"; type Member = { username: string; @@ -26,13 +27,16 @@ export async function fetchAllMembers(client: Client, guildID: string) { }); console.log("Finished fetching members. Total members:", membersCollected.length); writeToFile(membersCollected); + writeToFile(_.groupBy(membersCollected, "uid"), "grouped.json"); } catch (error) { console.error("Error fetching members:", error); } } -async function writeToFile(members: any) { - const fileName = `members_${new Date().toUTCString()}${Object.keys(members).length}.json`; +async function writeToFile( + members: any, + fileName = `members_${new Date().toUTCString()}${Object.keys(members).length}.json` +) { writeFile(fileName, JSON.stringify(members, null, 2), (err) => { if (err) { console.error("Error writing file:", err); diff --git a/src/commands/login.ts b/src/commands/login.ts deleted file mode 100644 index 2a2f21f..0000000 --- a/src/commands/login.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { - ActionRowBuilder, - ButtonBuilder, - ButtonStyle, - CommandInteraction, - SlashCommandBuilder, -} from "discord.js"; -import { NEXTAUTH_URL } from "../../config"; - -const login = { - data: new SlashCommandBuilder() - .setName("login") - .setDescription("kampus hesabina giris yapmak icin kullanilir"), - async execute(interaction: CommandInteraction) { - const github = new ButtonBuilder() - .setLabel("Sign in with GitHub") - .setURL(`${NEXTAUTH_URL}/signin/github`) - .setStyle(ButtonStyle.Link); - - const discord = new ButtonBuilder() - .setLabel("Sign in with Discord") - .setURL(`${NEXTAUTH_URL}/signin/discord`) - .setStyle(ButtonStyle.Link); - - const twitch = new ButtonBuilder() - .setLabel("Sign in with Twitch") - .setURL(`${NEXTAUTH_URL}/signin/twitch`) - .setStyle(ButtonStyle.Link); - - const row = new ActionRowBuilder().addComponents(github, discord, twitch); - - await interaction.reply({ - content: `Please select which action you would like to take.`, - components: [row], - }); - }, -}; - -export default login; diff --git a/src/utils/index.ts b/src/utils/index.ts index 1cdc92f..94fa16f 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,7 +1,6 @@ import { DiscordClient } from "../../createDiscordClient"; import path from "path"; import { fileURLToPath } from "url"; -import { NEXTAUTH_URL } from "../../config"; export const isUserInThisGuild = async (client: DiscordClient, userID: string, guildID: string) => { const guild = await client.guilds.fetch(guildID); @@ -19,25 +18,6 @@ export const getDirName = function (moduleUrl) { return path.dirname(filename); }; -export const getSession = async () => { - // const headers = new Headers(request.headers); - try { - // const cookie = headers.get("cookie"); - const session = await fetch(`${NEXTAUTH_URL}/session`, { - method: "GET", - headers: { - // cookie: cookie || "", - cookie: "", - }, - }).then((res) => res.json()); - - return session; - } catch (e) { - // handle error for session request fails - return null; - } -}; - export function formatDate(date: Date | number | string) { if (!(date instanceof Date)) date = new Date(date); const days = date.getDate().toString().padStart(2, "0"); // Add leading zero if needed From 36558087cbda5d2638f93a724fad68f6b0060451 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Sat, 25 Nov 2023 20:48:27 -0800 Subject: [PATCH 09/29] add error log --- src/commands/assign-role.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands/assign-role.ts b/src/commands/assign-role.ts index a348dfd..3366523 100644 --- a/src/commands/assign-role.ts +++ b/src/commands/assign-role.ts @@ -4,6 +4,10 @@ import members from "../../grouped.json"; export async function assignRole(client: Client, guildID: string, userID: string) { const guild = client.guilds.cache.get(guildID); // Replace with your guild ID if (!guild) return console.error("Guild not found."); + if (!members) { + console.error("You should run get-all-members first"); + return; + } try { const role = guild.roles.cache.find((r) => r.name === "v2"); // Replace with the role name From 308a5bd576157861fe7a2b3367af5b31305035c7 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Sat, 25 Nov 2023 21:05:09 -0800 Subject: [PATCH 10/29] fix .env.example --- .env.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 00003e6..c3080d0 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,3 @@ -CLIENT_ID=967524936551895051 -DISCORD_TOKEN=OTY3NTI0OTM2NTUxODk1MDUx.GKNC0b.el6R45Roys1V7IBPahAYwaKzgu-6QYOvYQQO4g +CLIENT_ID=client-id +DISCORD_TOKEN=discord-token CHATGPT_API_KEY=get-your-chatgpt-key From 2f3ecce30ddb65a40b8315f549f69932907f1c80 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Sat, 25 Nov 2023 21:33:43 -0800 Subject: [PATCH 11/29] wip --- .gitignore | 1 + deploy-commands.ts | 14 ++++++++++---- fly.toml | 22 ++++++++++++++++++++++ index.ts | 5 ++++- package-lock.json | 8 ++++++++ package.json | 2 ++ src/commands/get-all-members.ts | 6 ++---- 7 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 fly.toml diff --git a/.gitignore b/.gitignore index 6eeda0d..89877a6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules .DS_Store config.ts .env +grouped.json diff --git a/deploy-commands.ts b/deploy-commands.ts index 2039fa3..5a546fd 100644 --- a/deploy-commands.ts +++ b/deploy-commands.ts @@ -1,6 +1,6 @@ import { REST, Routes } from "discord.js"; import { readdirSync } from "fs"; -import { CLIENT_ID, DISCORD_TOKEN, KAMPUS_GUILD_ID } from "./config"; +import { KAMPUS_GUILD_ID } from "./config"; const commands: any[] = []; const commandFiles = readdirSync("./src/commands").filter((file) => file.endsWith(".ts")); @@ -12,18 +12,24 @@ for (const file of commandFiles) { console.log(commands); } -const rest = new REST({ version: "10" }).setToken(DISCORD_TOKEN); +if (process.env.DISCORD_TOKEN === undefined) { + throw new Error("DISCORD_TOKEN is undefined"); +} +const rest = new REST({ version: "10" }).setToken(process.env.DISCORD_TOKEN); (async (env) => { + if (process.env.CLIENT_ID === undefined) { + throw new Error("DISCORD_TOKEN is undefined"); + } try { console.log("Started refreshing application (/) commands."); if (env === "production") { console.log("Started refreshing guild (/) commands."); - await rest.put(Routes.applicationGuildCommands(CLIENT_ID, KAMPUS_GUILD_ID), { + await rest.put(Routes.applicationGuildCommands(process.env.CLIENT_ID, KAMPUS_GUILD_ID), { body: commands, }); } - await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands }); + await rest.put(Routes.applicationCommands(process.env.CLIENT_ID), { body: commands }); console.log("Successfully reloaded application (/) commands."); } catch (error) { diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..0e096b7 --- /dev/null +++ b/fly.toml @@ -0,0 +1,22 @@ +# fly.toml app configuration file generated for kampus-discord-bot on 2023-11-25T21:02:56-08:00 +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +app = "kampus-discord-bot" +primary_region = "sjc" + +[build] + +[http_service] + internal_port = 3000 + force_https = true + auto_stop_machines = true + auto_start_machines = true + min_machines_running = 0 + processes = ["app"] + +[[vm]] + cpu_kind = "shared" + cpus = 1 + memory_mb = 1024 diff --git a/index.ts b/index.ts index 78677f5..c8b2665 100644 --- a/index.ts +++ b/index.ts @@ -1,7 +1,10 @@ import { client } from "./createDiscordClient"; -import "dotenv/config"; +import dotenv from "dotenv"; + +dotenv.config(); // Login to Discord with your client's token +console.log("HEREEEEEEEE => ", process.env.DISCORD_TOKEN); client.login(process.env.DISCORD_TOKEN).then(() => { console.log("Logged in!"); }); diff --git a/package-lock.json b/package-lock.json index 8cead6d..2d792ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "discord-api-types": "^0.31.2", "discord.js": "^14.13.0", "dotenv": "^16.3.1", + "lodash": "^4.17.21", "node-fetch": "^3.2.10", "nodemon": "^2.0.22", "tiny-invariant": "^1.2.0", @@ -26,6 +27,7 @@ }, "devDependencies": { "@types/bcryptjs": "^2.4.2", + "@types/lodash": "^4.14.202", "@types/node": "^20.6.1", "eslint-config-prettier": "^8.5.0", "prettier": "^2.6.2", @@ -443,6 +445,12 @@ "integrity": "sha512-9wlJI7k5gRyJEC4yrV7DubzNQFTPiykYxUA6lBtsk5NlOfW9oWLJ1HdIA4YtE+6C3i3mTpDQQEosJ2rVZfBWnw==", "dev": true }, + "node_modules/@types/lodash": { + "version": "4.14.202", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", + "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==", + "dev": true + }, "node_modules/@types/node": { "version": "20.6.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.1.tgz", diff --git a/package.json b/package.json index 51aab7d..f3c2730 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "license": "ISC", "devDependencies": { "@types/bcryptjs": "^2.4.2", + "@types/lodash": "^4.14.202", "@types/node": "^20.6.1", "eslint-config-prettier": "^8.5.0", "prettier": "^2.6.2", @@ -30,6 +31,7 @@ "discord-api-types": "^0.31.2", "discord.js": "^14.13.0", "dotenv": "^16.3.1", + "lodash": "^4.17.21", "node-fetch": "^3.2.10", "nodemon": "^2.0.22", "tiny-invariant": "^1.2.0", diff --git a/src/commands/get-all-members.ts b/src/commands/get-all-members.ts index 88a179f..16e26da 100644 --- a/src/commands/get-all-members.ts +++ b/src/commands/get-all-members.ts @@ -1,6 +1,5 @@ import { Client, CommandInteraction, SlashCommandBuilder } from "discord.js"; import { writeFile } from "fs"; -import * as _ from "lodash"; type Member = { username: string; @@ -27,13 +26,12 @@ export async function fetchAllMembers(client: Client, guildID: string) { }); console.log("Finished fetching members. Total members:", membersCollected.length); writeToFile(membersCollected); - writeToFile(_.groupBy(membersCollected, "uid"), "grouped.json"); } catch (error) { console.error("Error fetching members:", error); } } -async function writeToFile( +function writeToFile( members: any, fileName = `members_${new Date().toUTCString()}${Object.keys(members).length}.json` ) { @@ -41,7 +39,7 @@ async function writeToFile( if (err) { console.error("Error writing file:", err); } else { - console.log("Messages saved to messages.json"); + console.log("Messages saved to " + fileName); } }); } From 611cf82c77a6f940be5baafd4f9561e03cc153f8 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Sat, 25 Nov 2023 21:38:44 -0800 Subject: [PATCH 12/29] change dev command --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3c2730..21d20a3 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "start": "nodemon index.ts", "test": "echo \"Error: no test specified\" && exit 1", - "dev": "ts-node ./index.ts" + "dev": "tsx ./index.ts" }, "keywords": [], "author": "", From a35c9439a62277c41adda362902d21034a09217c Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Sat, 25 Nov 2023 21:51:40 -0800 Subject: [PATCH 13/29] update file import --- Dockerfile | 2 +- fly.toml | 2 +- package.json | 3 ++- src/commands/assign-role.ts | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index cfc6f44..db27fd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,4 +27,4 @@ ADD . . # CMD ["./node_modules/.bin/nodemon", "index.ts"] # CMD ["node", "--loader", "ts-node/esm", "index.ts"] -CMD ["npm", "run", "dev"] +CMD ["npm", "start"] diff --git a/fly.toml b/fly.toml index 0e096b7..16c9550 100644 --- a/fly.toml +++ b/fly.toml @@ -1,4 +1,4 @@ -# fly.toml app configuration file generated for kampus-discord-bot on 2023-11-25T21:02:56-08:00 +# fly.toml app configuration file generated for kampus-discord-bot on 2023-11-25T21:46:57-08:00 # # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # diff --git a/package.json b/package.json index 21d20a3..47af6bc 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { - "name": "discord-bot", + "name": "kampus-discord-bot", "version": "1.0.0", "description": "", "main": "index.ts", "type": "module", + "module": "esnext", "scripts": { "start": "nodemon index.ts", "test": "echo \"Error: no test specified\" && exit 1", diff --git a/src/commands/assign-role.ts b/src/commands/assign-role.ts index 3366523..683d614 100644 --- a/src/commands/assign-role.ts +++ b/src/commands/assign-role.ts @@ -1,5 +1,6 @@ import { Client, CommandInteraction, SlashCommandBuilder } from "discord.js"; -import members from "../../grouped.json"; +// @ts-ignore +import members from "../../grouped.json" assert { type: "json" }; export async function assignRole(client: Client, guildID: string, userID: string) { const guild = client.guilds.cache.get(guildID); // Replace with your guild ID From c365fae1d77e26b60288c9b282e711adb9d819e0 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Sun, 26 Nov 2023 10:36:56 -0800 Subject: [PATCH 14/29] latest --- fly.toml | 21 +++++++++++---------- package.json | 1 - 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fly.toml b/fly.toml index 16c9550..9ac2c5a 100644 --- a/fly.toml +++ b/fly.toml @@ -1,4 +1,4 @@ -# fly.toml app configuration file generated for kampus-discord-bot on 2023-11-25T21:46:57-08:00 +# fly.toml app configuration file generated for kampus-discord-bot on 2023-11-25T22:07:03-08:00 # # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # @@ -7,16 +7,17 @@ app = "kampus-discord-bot" primary_region = "sjc" [build] +dockerfile = "Dockerfile" [http_service] - internal_port = 3000 - force_https = true - auto_stop_machines = true - auto_start_machines = true - min_machines_running = 0 - processes = ["app"] +internal_port = 3000 +force_https = true +auto_stop_machines = true +auto_start_machines = true +min_machines_running = 0 +processes = ["app"] [[vm]] - cpu_kind = "shared" - cpus = 1 - memory_mb = 1024 +cpu_kind = "shared" +cpus = 1 +memory_mb = 1024 diff --git a/package.json b/package.json index 47af6bc..d715585 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "description": "", "main": "index.ts", "type": "module", - "module": "esnext", "scripts": { "start": "nodemon index.ts", "test": "echo \"Error: no test specified\" && exit 1", From 7ca64662dbb1f1db38f005fbafcf412ba14e3a67 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Sun, 26 Nov 2023 10:51:47 -0800 Subject: [PATCH 15/29] latest update --- Dockerfile | 2 +- fly.toml | 22 +-- index.ts | 1 - package-lock.json | 408 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 1 + 5 files changed, 419 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index db27fd1..cfc6f44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,4 +27,4 @@ ADD . . # CMD ["./node_modules/.bin/nodemon", "index.ts"] # CMD ["node", "--loader", "ts-node/esm", "index.ts"] -CMD ["npm", "start"] +CMD ["npm", "run", "dev"] diff --git a/fly.toml b/fly.toml index 9ac2c5a..42ecf67 100644 --- a/fly.toml +++ b/fly.toml @@ -1,4 +1,4 @@ -# fly.toml app configuration file generated for kampus-discord-bot on 2023-11-25T22:07:03-08:00 +# fly.toml app configuration file generated for kampus-discord-bot on 2023-11-26T10:45:21-08:00 # # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # @@ -7,17 +7,17 @@ app = "kampus-discord-bot" primary_region = "sjc" [build] -dockerfile = "Dockerfile" + dockerfile = "Dockerfile" [http_service] -internal_port = 3000 -force_https = true -auto_stop_machines = true -auto_start_machines = true -min_machines_running = 0 -processes = ["app"] + internal_port = 3000 + force_https = true + auto_stop_machines = true + auto_start_machines = true + min_machines_running = 0 + processes = ["app"] [[vm]] -cpu_kind = "shared" -cpus = 1 -memory_mb = 1024 + cpu_kind = "shared" + cpus = 1 + memory_mb = 1024 diff --git a/index.ts b/index.ts index c8b2665..ccf2986 100644 --- a/index.ts +++ b/index.ts @@ -4,7 +4,6 @@ import dotenv from "dotenv"; dotenv.config(); // Login to Discord with your client's token -console.log("HEREEEEEEEE => ", process.env.DISCORD_TOKEN); client.login(process.env.DISCORD_TOKEN).then(() => { console.log("Logged in!"); }); diff --git a/package-lock.json b/package-lock.json index 2d792ef..b4053e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "discord-bot", + "name": "kampus-discord-bot", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "discord-bot", + "name": "kampus-discord-bot", "version": "1.0.0", "license": "ISC", "dependencies": { @@ -23,6 +23,7 @@ "nodemon": "^2.0.22", "tiny-invariant": "^1.2.0", "ts-node": "^10.9.1", + "tsx": "^4.5.0", "unique-names-generator": "^4.7.1" }, "devDependencies": { @@ -200,6 +201,336 @@ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.50.tgz", "integrity": "sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==" }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -965,6 +1296,42 @@ "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, + "node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -1302,6 +1669,17 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/get-tsconfig": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -1991,6 +2369,14 @@ "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -2230,6 +2616,24 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, + "node_modules/tsx": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.5.0.tgz", + "integrity": "sha512-hgxdziy9KLaHh9KE+a6tIZFP6kb0MLq/1D0sJVifbGP4QVEYhy6+2FNn7MyCm1pMc63p9CW/L1OzdqTNPxs6rg==", + "dependencies": { + "esbuild": "~0.18.20", + "get-tsconfig": "^4.7.2" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index d715585..d9d227b 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "nodemon": "^2.0.22", "tiny-invariant": "^1.2.0", "ts-node": "^10.9.1", + "tsx": "4.5.0", "unique-names-generator": "^4.7.1" } } From d140fd6dac65011fca41832e9770f1630db14d63 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Sun, 26 Nov 2023 14:18:03 -0800 Subject: [PATCH 16/29] make sure 1 machine is running --- fly.toml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fly.toml b/fly.toml index 42ecf67..be3956a 100644 --- a/fly.toml +++ b/fly.toml @@ -7,17 +7,17 @@ app = "kampus-discord-bot" primary_region = "sjc" [build] - dockerfile = "Dockerfile" +dockerfile = "Dockerfile" [http_service] - internal_port = 3000 - force_https = true - auto_stop_machines = true - auto_start_machines = true - min_machines_running = 0 - processes = ["app"] +internal_port = 3000 +force_https = true +auto_stop_machines = true +auto_start_machines = true +min_machines_running = 1 +processes = ["app"] [[vm]] - cpu_kind = "shared" - cpus = 1 - memory_mb = 1024 +cpu_kind = "shared" +cpus = 1 +memory_mb = 1024 From 574989f27fa0910ab52d5604555c1c8490b099f7 Mon Sep 17 00:00:00 2001 From: Can Sirin <8138047+cansirin@users.noreply.github.com> Date: Mon, 27 Nov 2023 01:38:55 -0800 Subject: [PATCH 17/29] refactor --- config.ts | 2 ++ deploy-commands.ts | 3 +++ package-lock.json | 2 +- src/commands/assign-role.ts | 20 +++++++++++++++---- src/commands/get-all-members.ts | 10 ++++++++-- src/commands/read-all-messages.ts | 2 +- src/events/guild-member-remove.ts | 20 +++++++++++++++++++ ...geCreate.ts => gunaydin-message-create.ts} | 7 +++++-- ...ractionCreate.ts => interaction-create.ts} | 0 src/utils/constants.ts | 1 - 10 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 src/events/guild-member-remove.ts rename src/events/{messageCreate.ts => gunaydin-message-create.ts} (82%) rename src/events/{interactionCreate.ts => interaction-create.ts} (100%) delete mode 100644 src/utils/constants.ts diff --git a/config.ts b/config.ts index 9e93458..3509bf0 100644 --- a/config.ts +++ b/config.ts @@ -1 +1,3 @@ export const KAMPUS_GUILD_ID = "717812863414042624"; +export const GIDENLER_CHANNEL_ID = "1105284895137345616"; +export const GUNAYDIN_CHANNEL_ID = "1158288028511522877"; diff --git a/deploy-commands.ts b/deploy-commands.ts index 5a546fd..7c3dde3 100644 --- a/deploy-commands.ts +++ b/deploy-commands.ts @@ -1,6 +1,9 @@ import { REST, Routes } from "discord.js"; import { readdirSync } from "fs"; import { KAMPUS_GUILD_ID } from "./config"; +import dotenv from "dotenv"; + +dotenv.config(); const commands: any[] = []; const commandFiles = readdirSync("./src/commands").filter((file) => file.endsWith(".ts")); diff --git a/package-lock.json b/package-lock.json index b4053e7..6e4ec4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "nodemon": "^2.0.22", "tiny-invariant": "^1.2.0", "ts-node": "^10.9.1", - "tsx": "^4.5.0", + "tsx": "4.5.0", "unique-names-generator": "^4.7.1" }, "devDependencies": { diff --git a/src/commands/assign-role.ts b/src/commands/assign-role.ts index 683d614..10a104b 100644 --- a/src/commands/assign-role.ts +++ b/src/commands/assign-role.ts @@ -4,7 +4,10 @@ import members from "../../grouped.json" assert { type: "json" }; export async function assignRole(client: Client, guildID: string, userID: string) { const guild = client.guilds.cache.get(guildID); // Replace with your guild ID - if (!guild) return console.error("Guild not found."); + if (!guild) { + console.error("Guild not found."); + return; + } if (!members) { console.error("You should run get-all-members first"); return; @@ -12,10 +15,16 @@ export async function assignRole(client: Client, guildID: string, userID: string try { const role = guild.roles.cache.find((r) => r.name === "v2"); // Replace with the role name - if (!role) return console.error("Role not found."); + if (!role) { + console.error("Role not found."); + return; + } const member = guild.members.cache.get(userID); // Replace with the user's ID - if (!member) return console.error("Member not found.", userID); + if (!member) { + console.error("Member not found."); + return; + } await member.roles.add(role); console.log(`Role ${role.name} added to ${member.user.tag}`); @@ -31,7 +40,10 @@ const assignRoleCommand = { async execute(interaction: CommandInteraction) { const client = interaction.client; const guildID = interaction.guildId; - if (guildID === null) return console.error("Guild ID is null."); + if (guildID === null) { + console.error("Guild ID is null."); + return; + } for (const member of Object.keys(members)) { await assignRole(client, guildID, member); diff --git a/src/commands/get-all-members.ts b/src/commands/get-all-members.ts index 16e26da..fffc4aa 100644 --- a/src/commands/get-all-members.ts +++ b/src/commands/get-all-members.ts @@ -10,7 +10,10 @@ type Member = { export async function fetchAllMembers(client: Client, guildID: string) { const guild = client.guilds.cache.get(guildID); // Replace with your guild ID - if (!guild) return console.error("Guild not found."); + if (!guild) { + console.error("Guild not found."); + return; + } let membersCollected: Member[] = []; try { @@ -51,7 +54,10 @@ const getAllMembers = { async execute(interaction: CommandInteraction) { const client = interaction.client; const guildID = interaction.guildId; - if (guildID === null) return console.error("Guild ID is null."); + if (guildID === null) { + console.error("Guild ID is null."); + return; + } const members = await fetchAllMembers(client, guildID); }, diff --git a/src/commands/read-all-messages.ts b/src/commands/read-all-messages.ts index 29c305c..b842456 100644 --- a/src/commands/read-all-messages.ts +++ b/src/commands/read-all-messages.ts @@ -3,7 +3,7 @@ import { setTimeout } from "timers/promises"; import { writeFile } from "fs"; import { formatDate } from "../utils"; import _ from "lodash"; -import { GUNAYDIN_CHANNEL_ID } from "../utils/constants"; +import { GUNAYDIN_CHANNEL_ID } from "../../config"; type Message = { author: string; diff --git a/src/events/guild-member-remove.ts b/src/events/guild-member-remove.ts new file mode 100644 index 0000000..0e34df5 --- /dev/null +++ b/src/events/guild-member-remove.ts @@ -0,0 +1,20 @@ +import { Events, GuildMember, TextChannel, bold } from "discord.js"; +import { GIDENLER_CHANNEL_ID } from "../../config"; + +const guildMemberRemove = { + name: Events.GuildMemberRemove, + async execute(member: GuildMember) { + const client = member.client; + const guild = member.guild; + + const gidenlerChannel = (await client.channels.fetch(GIDENLER_CHANNEL_ID)) as TextChannel; // Replace with your channel ID + if (!gidenlerChannel) return; + + console.log(`${member.user.tag} aramızdan ayrıldı :(`); + gidenlerChannel.send( + `${bold(member.user.tag)} aramızdan ayrıldı :(\nToplam üye sayısı: ${guild.memberCount}` + ); + }, +}; + +export default guildMemberRemove; diff --git a/src/events/messageCreate.ts b/src/events/gunaydin-message-create.ts similarity index 82% rename from src/events/messageCreate.ts rename to src/events/gunaydin-message-create.ts index 7df1817..a8a2ed7 100644 --- a/src/events/messageCreate.ts +++ b/src/events/gunaydin-message-create.ts @@ -1,13 +1,16 @@ import { Events, Message } from "discord.js"; import { assignRole } from "../commands/assign-role"; -import { GUNAYDIN_CHANNEL_ID } from "../utils/constants"; +import { GUNAYDIN_CHANNEL_ID } from "../../config"; const messageCreateInGunaydinChannel = { name: Events.MessageCreate, async execute(message: Message) { const client = message.client; const guildID = message.guild?.id; - if (!guildID) return console.error("Guild ID is null."); + if (!guildID) { + console.error("Guild ID is null."); + return; + } if (message.channel.id === GUNAYDIN_CHANNEL_ID) { const userRoles = message.member?.roles.cache.map((role) => role.name); diff --git a/src/events/interactionCreate.ts b/src/events/interaction-create.ts similarity index 100% rename from src/events/interactionCreate.ts rename to src/events/interaction-create.ts diff --git a/src/utils/constants.ts b/src/utils/constants.ts deleted file mode 100644 index de5e822..0000000 --- a/src/utils/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const GUNAYDIN_CHANNEL_ID = "1158288028511522877"; From f87a2cfb30b3284d91ed1c009c7db817bf3af458 Mon Sep 17 00:00:00 2001 From: Can Sirin <8138047+cansirin@users.noreply.github.com> Date: Mon, 27 Nov 2023 03:53:16 -0800 Subject: [PATCH 18/29] add soru-cevap thread starter --- config.ts | 1 + src/events/soru-cevap-message-create.ts | 56 +++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 src/events/soru-cevap-message-create.ts diff --git a/config.ts b/config.ts index 3509bf0..2ef4a75 100644 --- a/config.ts +++ b/config.ts @@ -1,3 +1,4 @@ export const KAMPUS_GUILD_ID = "717812863414042624"; export const GIDENLER_CHANNEL_ID = "1105284895137345616"; export const GUNAYDIN_CHANNEL_ID = "1158288028511522877"; +export const SORU_CEVAP_CHANNEL_ID = "1019649988550197248"; diff --git a/src/events/soru-cevap-message-create.ts b/src/events/soru-cevap-message-create.ts new file mode 100644 index 0000000..aa085fa --- /dev/null +++ b/src/events/soru-cevap-message-create.ts @@ -0,0 +1,56 @@ +import { Events, Message, ThreadChannel, bold } from "discord.js"; +import { SORU_CEVAP_CHANNEL_ID } from "../../config"; + +const isFirstMessageInSoruCevapChannel = (msg: Message, channel: ThreadChannel) => { + return ( + channel.messageCount === 1 && msg.position === 0 && channel.parentId === SORU_CEVAP_CHANNEL_ID + ); +}; + +const messageCreateInSoruCevapChannel = { + name: Events.MessageCreate, + async execute(msg: Message) { + if (msg.author.bot) return; + // add this line if you want to restrict this to only one user which is me = can :D + // if (msg.author.id !== "256111023939911683") return; + + const channel = msg.channel as ThreadChannel; + if (!isFirstMessageInSoruCevapChannel(msg, channel)) return; + + const interactionButton = { + type: 2, + style: 1, + label: "Okudum ve gerekli duzenlemeleri yaptim", + customId: "read and understood", + disabled: false, + }; + + const message = await channel.send({ + content: `## Selam ${msg.author.displayName}! Kucuk bir hatirlatma; lutfen sorunu sorarken ve sorduktan sonra su 6 maddeyi takip etmeyi unutma: + * Sorudan once neler yaptin? + * Ne yapmayi amacliyorsun? + * Karsilastigin hata neydi? + * Sordugun soru yazdigin bir kodla ilgiliyse mutlaka kod ornegi goster, hatta mumkunse github/gist linki ekle + * Tek bir Google aramasiyla bulabilecegin sorulari sorma + * Sorun cevaplandiktan sonra gonderi basligina **[Cozuldu]** eklemeyi unutma`, + components: [{ type: 1, components: [interactionButton] }], + }); + + const filter = (i) => i.customId === "read and understood" && i.user.id === msg.author.id; + const collector = message.createMessageComponentCollector({ filter }); + + collector.on("collect", async (interaction) => { + interaction.deferUpdate(); // Acknowledge the interaction + + // Disable the button + interactionButton.disabled = true; + // Update the message with the disabled button + await message.edit({ + content: message.content + "\n### Okudum ve gerekli duzenlemeleri yaptim ✅", + components: [{ type: 1, components: [interactionButton] }], + }); + }); + }, +}; + +export default messageCreateInSoruCevapChannel; From e2ce9a88e40241a90d6d08f039abc77280ba4344 Mon Sep 17 00:00:00 2001 From: Can Sirin <8138047+cansirin@users.noreply.github.com> Date: Mon, 27 Nov 2023 04:43:22 -0800 Subject: [PATCH 19/29] add gidenler video env --- src/events/guild-member-remove.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/events/guild-member-remove.ts b/src/events/guild-member-remove.ts index 0e34df5..d803d2f 100644 --- a/src/events/guild-member-remove.ts +++ b/src/events/guild-member-remove.ts @@ -12,7 +12,8 @@ const guildMemberRemove = { console.log(`${member.user.tag} aramızdan ayrıldı :(`); gidenlerChannel.send( - `${bold(member.user.tag)} aramızdan ayrıldı :(\nToplam üye sayısı: ${guild.memberCount}` + `${bold(member.user.tag)} aramızdan ayrıldı :(\nToplam üye sayısı: ${guild.memberCount}\n + Ona burdan bu videoyu gönderelim\n${process.env.GIDENLER_VIDEO_LINK}}` ); }, }; From 603689c70643f861bdd4f29f49bfad7df133e7da Mon Sep 17 00:00:00 2001 From: Can Sirin <8138047+cansirin@users.noreply.github.com> Date: Mon, 27 Nov 2023 04:47:49 -0800 Subject: [PATCH 20/29] update .env.example and removemember --- .env.example | 1 + src/events/guild-member-remove.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index c3080d0..cc07d9c 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ CLIENT_ID=client-id DISCORD_TOKEN=discord-token CHATGPT_API_KEY=get-your-chatgpt-key +GIDENLER_VIDEO_LINK=youtube-link diff --git a/src/events/guild-member-remove.ts b/src/events/guild-member-remove.ts index d803d2f..37bc820 100644 --- a/src/events/guild-member-remove.ts +++ b/src/events/guild-member-remove.ts @@ -12,8 +12,13 @@ const guildMemberRemove = { console.log(`${member.user.tag} aramızdan ayrıldı :(`); gidenlerChannel.send( - `${bold(member.user.tag)} aramızdan ayrıldı :(\nToplam üye sayısı: ${guild.memberCount}\n - Ona burdan bu videoyu gönderelim\n${process.env.GIDENLER_VIDEO_LINK}}` + `${bold(member.user.tag)} aramızdan ayrıldı :(\nToplam üye sayısı: ${guild.memberCount} + ${ + process.env.GIDENLER_VIDEO_LINK + ? `\nOna burdan bu videoyu gönderelim\n ${process.env.GIDENLER_VIDEO_LINK}}` + : "" + } + ` ); }, }; From 49796583b69a6bf041094c532ae23fdc86c82ce8 Mon Sep 17 00:00:00 2001 From: Can Sirin <8138047+cansirin@users.noreply.github.com> Date: Fri, 1 Dec 2023 00:43:33 -0800 Subject: [PATCH 21/29] fix things --- src/commands/read-all-messages.ts | 17 +++++++---- src/commands/recycle-v2-roles.ts | 49 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 src/commands/recycle-v2-roles.ts diff --git a/src/commands/read-all-messages.ts b/src/commands/read-all-messages.ts index b842456..76af837 100644 --- a/src/commands/read-all-messages.ts +++ b/src/commands/read-all-messages.ts @@ -2,7 +2,7 @@ import { Client, CommandInteraction, SlashCommandBuilder, TextChannel } from "di import { setTimeout } from "timers/promises"; import { writeFile } from "fs"; import { formatDate } from "../utils"; -import _ from "lodash"; +import _, { get } from "lodash"; import { GUNAYDIN_CHANNEL_ID } from "../../config"; type Message = { @@ -12,12 +12,17 @@ type Message = { createdAt: string; }; -async function fetchMessages(client: Client, channelID: string, N_DAYS_AGO = 7) { - const channel = (await client.channels.fetch(channelID)) as TextChannel; // Replace with your channel ID +const getDaysAgo = (n: number) => { const today = new Date(); - const endDate = new Date(today.getTime() - N_DAYS_AGO * 24 * 60 * 60 * 1000); + const endDate = new Date(today.getTime() - n * 24 * 60 * 60 * 1000); endDate.setHours(0, 0, 0, 0); - const endTime = endDate.getTime(); + return endDate.getTime(); +}; + +async function fetchMessages(client: Client, channelID: string, days = 7) { + const channel = (await client.channels.fetch(channelID)) as TextChannel; // Replace with your channel ID + // get ${days} days ago from today in milliseconds from 00:00:00 + const nDaysAgo = getDaysAgo(days); let lastId: string | undefined; let messagesCollected: Message[] = []; @@ -35,7 +40,7 @@ async function fetchMessages(client: Client, channelID: string, N_DAYS_AGO = 7) } // Filter and collect messages - const filteredMessages = messages.filter((m) => m.createdTimestamp > endTime); + const filteredMessages = messages.filter((m) => m.createdTimestamp > nDaysAgo); filteredMessages.toJSON().forEach((m) => messagesCollected.push({ author: m.author.username, diff --git a/src/commands/recycle-v2-roles.ts b/src/commands/recycle-v2-roles.ts new file mode 100644 index 0000000..f25a6d7 --- /dev/null +++ b/src/commands/recycle-v2-roles.ts @@ -0,0 +1,49 @@ +import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js"; +// @ts-ignore +import members from "../../grouped.json" assert { type: "json" }; +import { GIDENLER_CHANNEL_ID } from "../../config"; + +const recycleV2Roles = { + data: new SlashCommandBuilder() + .setDescription("Recycle v2 roles. Before running this command run get-messages") + .setName("recycle-v2-roles"), + async execute(interaction: CommandInteraction) { + const { guild } = interaction; + if (!guild) return; + + const rolesToDelete = guild.roles.cache.find((role) => role.name.startsWith("v2")); + if (!rolesToDelete) { + console.error("Role not found."); + return; + } + // find all members with v2 role + const membersWithV2Role = guild.members.cache.filter((member) => + member.roles.cache.some((role) => role.name.startsWith("v2")) + ); + + // remove v2 role from members who are not in the grouped.json file + let count = 0; + let removedUsers: String[] = []; + membersWithV2Role.forEach((member) => { + const memberData = members[member.user.id]; + if (!memberData) { + console.log(`Removing v2 role from ${member.user.tag}`); + member.roles.remove(rolesToDelete); + removedUsers.push(member.user.tag); + count++; + } + }); + + const channel = interaction.client.channels.cache.get(GIDENLER_CHANNEL_ID) as TextChannel; + if (!channel) return; + await channel.send( + `Done. ${count} members were removed from v2 role. These are removed users: ${removedUsers.map( + (user) => { + return `\n${user}`; + } + )}` + ); + }, +}; + +export default recycleV2Roles; From 9c105c6aeaae0a6bc9549d29fea734ceb79d1847 Mon Sep 17 00:00:00 2001 From: Can Sirin <8138047+cansirin@users.noreply.github.com> Date: Fri, 1 Dec 2023 02:53:36 -0800 Subject: [PATCH 22/29] add gunun-sorusu command --- src/commands/daily-morning-question.ts | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/commands/daily-morning-question.ts diff --git a/src/commands/daily-morning-question.ts b/src/commands/daily-morning-question.ts new file mode 100644 index 0000000..eb3cbbb --- /dev/null +++ b/src/commands/daily-morning-question.ts @@ -0,0 +1,38 @@ +import { CommandInteraction, Constants, SlashCommandBuilder, TextChannel } from "discord.js"; +import { GUNAYDIN_CHANNEL_ID } from "../../config"; + +const allowedUsers = ["256111023939911683", "297782785396178946"]; + +module.exports = { + data: new SlashCommandBuilder() + .setName("gunun-sorusu") + .setDescription("Günün sorusunu oluşturur."), + async execute(interaction: CommandInteraction) { + const channel = (await interaction.client.channels.fetch("839426893547044890")) as TextChannel; + + const today = new Date(); + const options = { + month: "long", + day: "numeric", + } as Intl.DateTimeFormatOptions; + const formattedDate = new Intl.DateTimeFormat("tr-TR", options).format(today); + + const thread = await channel.threads.create({ + name: "Günün Sorusu - " + formattedDate, + }); + + const geyik = `<:geyik:1161771822350602260>`; + const threadMention = `<#${thread.id}>`; + const message = await channel.send(threadMention); + const threadMessage = await thread.send( + `Volkan abi ve geyikler günün sorusunu soruyor!\n ${geyik} ${geyik} ${geyik} ${geyik} ${geyik} ${geyik}` + ); + const messagePin = await message.pin(); + Promise.all([threadMessage, messagePin, message]); + + interaction.reply({ + content: `Günün sorusu başarıyla oluşturuldu! Thread icin: ${threadMention}`, + ephemeral: true, + }); + }, +}; From 6cf80056e19e1ca504dc935929ca5c544d3c842d Mon Sep 17 00:00:00 2001 From: Can Sirin <8138047+cansirin@users.noreply.github.com> Date: Fri, 1 Dec 2023 02:57:06 -0800 Subject: [PATCH 23/29] update channel --- src/commands/daily-morning-question.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/daily-morning-question.ts b/src/commands/daily-morning-question.ts index eb3cbbb..dcdc596 100644 --- a/src/commands/daily-morning-question.ts +++ b/src/commands/daily-morning-question.ts @@ -8,7 +8,7 @@ module.exports = { .setName("gunun-sorusu") .setDescription("Günün sorusunu oluşturur."), async execute(interaction: CommandInteraction) { - const channel = (await interaction.client.channels.fetch("839426893547044890")) as TextChannel; + const channel = (await interaction.client.channels.fetch(GUNAYDIN_CHANNEL_ID)) as TextChannel; const today = new Date(); const options = { From 35d701fcb8e8cb3a6ac9829a8584f82405876c64 Mon Sep 17 00:00:00 2001 From: Can Sirin <8138047+cansirin@users.noreply.github.com> Date: Fri, 1 Dec 2023 03:13:11 -0800 Subject: [PATCH 24/29] remove allowed users --- src/commands/daily-morning-question.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/commands/daily-morning-question.ts b/src/commands/daily-morning-question.ts index dcdc596..732e78e 100644 --- a/src/commands/daily-morning-question.ts +++ b/src/commands/daily-morning-question.ts @@ -1,8 +1,6 @@ import { CommandInteraction, Constants, SlashCommandBuilder, TextChannel } from "discord.js"; import { GUNAYDIN_CHANNEL_ID } from "../../config"; -const allowedUsers = ["256111023939911683", "297782785396178946"]; - module.exports = { data: new SlashCommandBuilder() .setName("gunun-sorusu") From ddbeb5c8d6a2fb6c49bf00e221fc788ed5fa64da Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Thu, 7 Dec 2023 21:57:40 -0800 Subject: [PATCH 25/29] enable get messages to work with user & channel --- src/commands/read-all-messages.ts | 64 +++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 12 deletions(-) diff --git a/src/commands/read-all-messages.ts b/src/commands/read-all-messages.ts index 76af837..c9ade2f 100644 --- a/src/commands/read-all-messages.ts +++ b/src/commands/read-all-messages.ts @@ -19,8 +19,13 @@ const getDaysAgo = (n: number) => { return endDate.getTime(); }; -async function fetchMessages(client: Client, channelID: string, days = 7) { - const channel = (await client.channels.fetch(channelID)) as TextChannel; // Replace with your channel ID +async function fetchMessages( + client: Client, + channelID: string, + days = 7, + userID: string | undefined +) { + const channel = (await client.channels.fetch(channelID)) as TextChannel; // get ${days} days ago from today in milliseconds from 00:00:00 const nDaysAgo = getDaysAgo(days); @@ -35,12 +40,20 @@ async function fetchMessages(client: Client, channelID: string, days = 7) { // Stop if no more messages are retrieved if (messages.size === 0) { + // if there are no messages in the chat + if (messagesCollected.length === 0) { + console.log("No messages collected."); + return; + } + // if there are no more messages to fetch console.log("No more messages to fetch."); break; } // Filter and collect messages - const filteredMessages = messages.filter((m) => m.createdTimestamp > nDaysAgo); + const filteredMessages = messages.filter((m) => { + return m.createdTimestamp > nDaysAgo; + }); filteredMessages.toJSON().forEach((m) => messagesCollected.push({ author: m.author.username, @@ -50,22 +63,37 @@ async function fetchMessages(client: Client, channelID: string, days = 7) { }) ); - // Break if no messages in the current fetch are within the time range if (filteredMessages.size === 0) { - writeToFile(messagesCollected); const grouped = _.groupBy(messagesCollected, "uid"); + if (userID) { + const options = { + month: "long", + day: "numeric", + }; + const formattedDate = new Intl.DateTimeFormat("tr-TR", { + month: "2-digit", + year: "2-digit", + day: "numeric", + hour: "numeric", + minute: "numeric", + second: "numeric", + }).format(new Date()); + writeToFile( + grouped[userID], + `./messages/u:${userID}-c:${channelID}-a:${days}-d:${formattedDate}.json` + ); + return grouped[userID]; + } writeToFile(grouped, "grouped.json"); - return messagesCollected; + return grouped; } // Update lastId for the next iteration lastId = messages.lastKey(); - console.log(messagesCollected.length, "messages collected so far."); + console.log(messagesCollected.length, " messages collected so far."); await setTimeout(1000); // Respect rate limits } - - console.log("Finished fetching messages."); } async function writeToFile( @@ -84,11 +112,23 @@ async function writeToFile( const getMessages = { data: new SlashCommandBuilder() .setName("get-messages") - .setDescription("Fetches messages from a channel"), + .setDescription("Fetches messages from a channel") + .addChannelOption((option) => + option.setName("channel-name").setDescription("channel name").setRequired(true) + ) + .addNumberOption((option) => + option + .setName("days") + .setDescription("Number of days to fetch messages from") + .setRequired(true) + ) + .addUserOption((option) => option.setName("user-name").setDescription("user name")), async execute(interaction: CommandInteraction) { const client = interaction.client; - const channelID = GUNAYDIN_CHANNEL_ID; - const messages = await fetchMessages(client, channelID, 14); + const channelID = interaction.options.get("channel-name")?.value as string; + const userID = interaction.options.get("user-name")?.value?.toString(); + const days = interaction.options.get("days")?.value as number; + const messages = await fetchMessages(client, channelID, days, userID); }, }; From e86613d67d94661a7b5f2ef533ed1544e09b19c1 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Thu, 7 Dec 2023 21:58:30 -0800 Subject: [PATCH 26/29] remove unused code --- src/commands/read-all-messages.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/commands/read-all-messages.ts b/src/commands/read-all-messages.ts index c9ade2f..852e1e6 100644 --- a/src/commands/read-all-messages.ts +++ b/src/commands/read-all-messages.ts @@ -66,10 +66,6 @@ async function fetchMessages( if (filteredMessages.size === 0) { const grouped = _.groupBy(messagesCollected, "uid"); if (userID) { - const options = { - month: "long", - day: "numeric", - }; const formattedDate = new Intl.DateTimeFormat("tr-TR", { month: "2-digit", year: "2-digit", From 4b8ff676081136ceea451928268030513dab4ee1 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Thu, 7 Dec 2023 22:11:28 -0800 Subject: [PATCH 27/29] Create fly.yml --- .github/workflows/fly.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/fly.yml diff --git a/.github/workflows/fly.yml b/.github/workflows/fly.yml new file mode 100644 index 0000000..fd3bf6a --- /dev/null +++ b/.github/workflows/fly.yml @@ -0,0 +1,15 @@ +name: Fly deploy +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: flyctl deploy --remote-only + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} From d293a96711782be3cccfef0116f6e272cb31bfe5 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Thu, 7 Dec 2023 22:29:08 -0800 Subject: [PATCH 28/29] fix channel --- .env.example | 1 + config.ts | 1 - src/commands/read-all-messages.ts | 3 +-- src/commands/recycle-v2-roles.ts | 5 +++-- src/events/guild-member-remove.ts | 5 +++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index cc07d9c..68ef4a7 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ CLIENT_ID=client-id DISCORD_TOKEN=discord-token CHATGPT_API_KEY=get-your-chatgpt-key +GIDENLER_CHANNEL_ID=channel-id GIDENLER_VIDEO_LINK=youtube-link diff --git a/config.ts b/config.ts index 2ef4a75..305470c 100644 --- a/config.ts +++ b/config.ts @@ -1,4 +1,3 @@ export const KAMPUS_GUILD_ID = "717812863414042624"; -export const GIDENLER_CHANNEL_ID = "1105284895137345616"; export const GUNAYDIN_CHANNEL_ID = "1158288028511522877"; export const SORU_CEVAP_CHANNEL_ID = "1019649988550197248"; diff --git a/src/commands/read-all-messages.ts b/src/commands/read-all-messages.ts index 852e1e6..dfdf1f1 100644 --- a/src/commands/read-all-messages.ts +++ b/src/commands/read-all-messages.ts @@ -2,8 +2,7 @@ import { Client, CommandInteraction, SlashCommandBuilder, TextChannel } from "di import { setTimeout } from "timers/promises"; import { writeFile } from "fs"; import { formatDate } from "../utils"; -import _, { get } from "lodash"; -import { GUNAYDIN_CHANNEL_ID } from "../../config"; +import _ from "lodash"; type Message = { author: string; diff --git a/src/commands/recycle-v2-roles.ts b/src/commands/recycle-v2-roles.ts index f25a6d7..cbe15c6 100644 --- a/src/commands/recycle-v2-roles.ts +++ b/src/commands/recycle-v2-roles.ts @@ -1,7 +1,6 @@ import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js"; // @ts-ignore import members from "../../grouped.json" assert { type: "json" }; -import { GIDENLER_CHANNEL_ID } from "../../config"; const recycleV2Roles = { data: new SlashCommandBuilder() @@ -34,7 +33,9 @@ const recycleV2Roles = { } }); - const channel = interaction.client.channels.cache.get(GIDENLER_CHANNEL_ID) as TextChannel; + const channel = interaction.client.channels.cache.get( + process.env.GIDENLER_CHANNEL_ID ?? "" + ) as TextChannel; if (!channel) return; await channel.send( `Done. ${count} members were removed from v2 role. These are removed users: ${removedUsers.map( diff --git a/src/events/guild-member-remove.ts b/src/events/guild-member-remove.ts index 37bc820..48233da 100644 --- a/src/events/guild-member-remove.ts +++ b/src/events/guild-member-remove.ts @@ -1,5 +1,4 @@ import { Events, GuildMember, TextChannel, bold } from "discord.js"; -import { GIDENLER_CHANNEL_ID } from "../../config"; const guildMemberRemove = { name: Events.GuildMemberRemove, @@ -7,7 +6,9 @@ const guildMemberRemove = { const client = member.client; const guild = member.guild; - const gidenlerChannel = (await client.channels.fetch(GIDENLER_CHANNEL_ID)) as TextChannel; // Replace with your channel ID + const gidenlerChannel = (await client.channels.fetch( + process.env.GIDENLER_CHANNEL_ID ?? "" + )) as TextChannel; // Replace with your channel ID if (!gidenlerChannel) return; console.log(`${member.user.tag} aramızdan ayrıldı :(`); From 7ab7d92ebad0cac17b988751fc0054b8d80699c1 Mon Sep 17 00:00:00 2001 From: Can Sirin Date: Thu, 7 Dec 2023 22:31:19 -0800 Subject: [PATCH 29/29] remove unused commands --- src/commands/unused/changePassword.js | 33 ------------ src/commands/unused/confirmActivation.js | 25 --------- src/commands/unused/goLive.js | 36 ------------- src/commands/unused/help.js | 24 --------- src/commands/unused/info.js | 56 -------------------- src/commands/unused/resendActivation.js | 21 -------- src/commands/unused/sendResetPasswordCode.js | 25 --------- src/commands/unused/signup.ts | 39 -------------- 8 files changed, 259 deletions(-) delete mode 100644 src/commands/unused/changePassword.js delete mode 100644 src/commands/unused/confirmActivation.js delete mode 100644 src/commands/unused/goLive.js delete mode 100644 src/commands/unused/help.js delete mode 100644 src/commands/unused/info.js delete mode 100644 src/commands/unused/resendActivation.js delete mode 100644 src/commands/unused/sendResetPasswordCode.js delete mode 100644 src/commands/unused/signup.ts diff --git a/src/commands/unused/changePassword.js b/src/commands/unused/changePassword.js deleted file mode 100644 index f776847..0000000 --- a/src/commands/unused/changePassword.js +++ /dev/null @@ -1,33 +0,0 @@ -import { SlashCommandBuilder } from "@discordjs/builders"; -import { cognitoChangePassword } from "../../../cognitoChangePassword.js"; -import { sendWithDefer } from "../../../sendWithDefer.js"; -import Debug from "debug"; - -const debug = Debug("kampus-bot:commands:changePassword"); - -const changePassword = { - data: new SlashCommandBuilder() - .setName("sifre-degistir") - .setDescription("Kullanicinin sifresini degistirir.") - .addStringOption((option) => - option.setName("kullanici-adi").setDescription("Kullanıcı adı").setRequired(true) - ) - .addStringOption((option) => - option.setName("sifirlama-kodu").setDescription("Sıfırlama kodu").setRequired(true) - ) - .addStringOption((option) => - option.setName("yeni-sifre").setRequired(true).setDescription("Yeni şifre") - ), - async execute(interaction) { - const username = interaction.options.getString("kullanici-adi"); - const code = interaction.options.getString("sifirlama-kodu"); - const password = interaction.options.getString("yeni-sifre"); - - cognitoChangePassword(username, code, password, async ({ message }) => { - await sendWithDefer(interaction, 2000, message); - }); - }, -}; -debug("registered"); - -export default changePassword; diff --git a/src/commands/unused/confirmActivation.js b/src/commands/unused/confirmActivation.js deleted file mode 100644 index 66007f3..0000000 --- a/src/commands/unused/confirmActivation.js +++ /dev/null @@ -1,25 +0,0 @@ -import { SlashCommandBuilder } from "@discordjs/builders"; -import { cognitoConfirmUser } from "../../../cognitoConfirmUser.js"; -import { sendWithDefer } from "../../../sendWithDefer.js"; - -const confirmActivation = { - data: new SlashCommandBuilder() - .setName("uyelik-onayla") - .setDescription("Uyelik onayla") - .addStringOption((option) => - option.setName("kullanici-adi").setRequired(true).setDescription("Kullanıcı adınızı yazın") - ) - .addStringOption((option) => - option.setName("aktivasyon-kodu").setRequired(true).setDescription("Aktivasyon kodunu girin") - ), - async execute(interaction) { - const username = interaction.options.getString("kullanici-adi"); - const code = interaction.options.getString("aktivasyon-kodu"); - - cognitoConfirmUser(username, code, async ({ message }) => { - await sendWithDefer(interaction, 2000, message); - }); - }, -}; - -export default confirmActivation; diff --git a/src/commands/unused/goLive.js b/src/commands/unused/goLive.js deleted file mode 100644 index ed90e76..0000000 --- a/src/commands/unused/goLive.js +++ /dev/null @@ -1,36 +0,0 @@ -import { SlashCommandBuilder } from "@discordjs/builders"; -import { MessageEmbed } from "discord.js"; - -const goLive = { - data: new SlashCommandBuilder() - .setName("yayindayim") - .setDescription("Yayinda oldugunu belli etmek icin kullanilir") - .addStringOption((option) => - option.setName("yayin-basligi").setDescription("Yayin basligini belirtin").setRequired(true) - ) - .addStringOption((option) => - option.setName("yayin-linki").setDescription("Yayin linkini belirtin").setRequired(true) - ), - async execute(interaction, discordClient) { - const streamTitle = interaction.options.getString("yayin-basligi"); - const streamLink = interaction.options.getString("yayin-linki"); - const channel = discordClient.channels.cache.get("672571847467860027"); - const user = interaction.user; - - const exampleEmbed = new MessageEmbed() - .setColor("#ff8a00") - .setTitle(streamTitle) - .setURL(streamLink) - .setAuthor({ - name: user.username, - iconURL: user.displayAvatarURL(), - }) - .setDescription("Yayindayim arkadaslarim") - .setImage("https://bit.ly/3k5XcAT") - .setTimestamp(); - - channel.send({ embeds: [exampleEmbed] }); - }, -}; - -export default goLive; diff --git a/src/commands/unused/help.js b/src/commands/unused/help.js deleted file mode 100644 index 8ae4d4c..0000000 --- a/src/commands/unused/help.js +++ /dev/null @@ -1,24 +0,0 @@ -import { SlashCommandBuilder } from "@discordjs/builders"; -import { sendWithDefer } from "../../../sendWithDefer.js"; -import Debug from "debug"; - -const debug = Debug("kampus-bot:commands:help"); - -const help = { - data: new SlashCommandBuilder().setName("yardim").setDescription("Yardım"), - async execute(interaction) { - debug(interaction); - await sendWithDefer( - interaction, - 2000, - "**Komutlar:**\n\n" + - "/uye-ol - pano.kamp.us'e uye yapar\n" + - "/uyelik-onayla - pano.kamp.us uyeligini onaylar\n" + - "/uyelik-aktivasyon-kodu-gonder - pano.kamp.us uyeligi icin gereken aktivasyon kodunu yeniden gonderir\n" + - "/yardim - yardim komutunu gosterir\n" - ); - }, -}; - -debug("registered"); -export default help; diff --git a/src/commands/unused/info.js b/src/commands/unused/info.js deleted file mode 100644 index 2ebc58a..0000000 --- a/src/commands/unused/info.js +++ /dev/null @@ -1,56 +0,0 @@ -import { bold, SlashCommandBuilder, spoiler } from "@discordjs/builders"; - -const info = { - data: new SlashCommandBuilder() - .setName("info") - .setDescription("Get info about a user or a server!") - .addSubcommand((subcommand) => - subcommand - .setName("user") - .setDescription("Info about a user") - .addUserOption((option) => option.setName("target").setDescription("The user")) - ) - .addSubcommand((subcommand) => - subcommand.setName("server").setDescription("Info about the server") - ) - .addSubcommand((subcommand) => subcommand.setName("deneme").setDescription("deneme")), - async execute(interaction) { - const subCommand = interaction.options.getSubcommand(); - - switch (subCommand) { - case "user": - const user = interaction.options.getUser("target"); - if (user) { - await interaction.reply(`Username: ${user.username}\nID: ${user.id}`); - } else { - await interaction.reply( - `Your username: ${interaction.user.username}\nYour ID: ${interaction.user.id}` - ); - } - break; - - case "server": - const type = interaction.channel.type; - if (type === "DM") { - await interaction.reply("/info server komutu DM'de kullanılamaz."); - } - await interaction.reply( - `Server name: ${interaction.guild.name}\nTotal members: ${interaction.guild.memberCount}` - ); - break; - - case "deneme": - await interaction.reply( - `yo ismiyle kayıt oldun` + - `\nHesabının şifresi -> ${spoiler("123")} <- olarak ayarlandı` + - `\nEmail adresine aktivasyon kodu gönderildi` + - `\n-----------------------------------------------------------` + - `\nŞimdi /uyelik-onayla komutunu çalıstırarak üyeliğini onaylayabilirsin` + - `\nhttps://pano.kamp.us/login adresinden giriş yaptıktan sonra şifreni değiştirmeni öneririz` + - `\n:tada::tada: ${bold("pano.kamp.us'e hosgeldin!")} :tada::tada:` - ); - } - }, -}; - -export default info; diff --git a/src/commands/unused/resendActivation.js b/src/commands/unused/resendActivation.js deleted file mode 100644 index a7c0680..0000000 --- a/src/commands/unused/resendActivation.js +++ /dev/null @@ -1,21 +0,0 @@ -import { SlashCommandBuilder } from "@discordjs/builders"; -import { cognitoResendActivation } from "../../../cognitoResendActivation.js"; -import { sendWithDefer } from "../../../sendWithDefer.js"; - -const resendActivation = { - data: new SlashCommandBuilder() - .setName(`uyelik-aktivasyon-kodu-gonder`) - .setDescription("Uyelik aktivasyon kodunu tekrar gonderir.") - .addStringOption((option) => - option.setName("kullanici-adi").setRequired(true).setDescription("Kullanici adi") - ), - async execute(interaction) { - const username = interaction.options.getString("kullanici-adi"); - - cognitoResendActivation(username, async ({ message }) => { - await sendWithDefer(interaction, 2000, message); - }); - }, -}; - -export default resendActivation; diff --git a/src/commands/unused/sendResetPasswordCode.js b/src/commands/unused/sendResetPasswordCode.js deleted file mode 100644 index 7027f68..0000000 --- a/src/commands/unused/sendResetPasswordCode.js +++ /dev/null @@ -1,25 +0,0 @@ -import { SlashCommandBuilder } from "@discordjs/builders"; -import { cognitoForgotPassword } from "../../../cognitoForgotPassword.js"; -import { sendWithDefer } from "../../../sendWithDefer.js"; - -const sendResetPasswordCode = { - data: new SlashCommandBuilder() - .setName("sifremi-unuttum") - .setDescription("pano.kamp.us hesabının şifresini sıfırlamak için gereken kodu gönderir.") - .addStringOption((option) => - option.setName("kullanici-adi").setDescription("Kullanıcı adı").setRequired(true) - ), - async execute(interaction) { - const username = interaction.options.getString("kullanici-adi"); - - cognitoForgotPassword(username, async ({ message }) => { - await sendWithDefer( - interaction, - 2000, - `Email adresine sifre sifirlama kodu gonderildi. Bu kodu /sifre-degistir komutuyla calistiriniz.` - ); - }); - }, -}; - -export default sendResetPasswordCode; diff --git a/src/commands/unused/signup.ts b/src/commands/unused/signup.ts deleted file mode 100644 index 0e83bf3..0000000 --- a/src/commands/unused/signup.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { bold, SlashCommandBuilder, spoiler } from "@discordjs/builders"; -import { sendWithDefer } from "../../../sendWithDefer"; - -const usernameOption = "kullanici-adi"; -const emailOption = "e-posta"; - -export const signup = { - data: new SlashCommandBuilder() - .setName("uye-ol") - .setDescription("pano.kamp.us'a üye olmak için kullanılır") - .addStringOption((option) => - option - .setName(usernameOption) - .setDescription("pano.kamp.us'e kayıt olmak için kullanıcı adı") - .setRequired(true) - ) - .addStringOption((option) => - option - .setName("e-posta") - .setDescription("pano.kamp.us'e kayıt olmak için email adresi") - .setRequired(true) - ), - async execute(interaction: any) { - const email = interaction.options.getString(emailOption); - const username = interaction.options.getString(usernameOption); - const loginUrl = "https://pano.kamp.us/login"; - - await sendWithDefer( - interaction, - 2000, - `${username} ismiyle kayıt oldun` + - `\nHesabının şifresi -> ${spoiler("hehehhe")} <- olarak ayarlandı` + - `\n-----------------------------------------------------------` + - `\n/yardim komutunu çalıstırarak bütün komutları görebilirsin` + - `\nhttps://pano.kamp.us/login adresinden giriş yaptıktan sonra şifreni değiştirmeni öneririz` + - `\n:tada::tada: ${bold(loginUrl)} :tada::tada:` - ); - }, -};