From da246779bb39f045c9fa8a60d6c55e6169e1148b Mon Sep 17 00:00:00 2001 From: "Rhys (SunburntRock89)" Date: Sat, 29 Oct 2022 00:58:00 +0100 Subject: [PATCH] Most of Mailbox implemented --- package-lock.json | 737 +++++++++++--------- package.json | 28 +- prisma/schema.prisma | 25 +- src/TODO | 9 +- src/commands/standard/call.ts | 2 +- src/commands/standard/convert.ts | 12 + src/commands/standard/mailbox clear.ts | 30 + src/commands/standard/mailbox messages.ts | 14 + src/commands/standard/mailbox settings.ts | 37 + src/config/commands.ts | 34 + src/events/interactionCreate.ts | 12 +- src/interactions/mailbox/clear/confirm.ts | 22 + src/interactions/mailbox/send/initiate.ts | 25 + src/interactions/mailbox/send/modal.ts | 55 ++ src/interactions/mailbox/settings/update.ts | 53 ++ src/interactions/mention/remove/selector.ts | 4 +- src/internals/callClient.ts | 55 +- src/internals/client.ts | 1 + src/internals/processor.ts | 14 +- src/internationalization/data/english.ts | 5 +- target/npmlist.json | 2 +- tsconfig.json | 4 +- 22 files changed, 799 insertions(+), 381 deletions(-) create mode 100644 src/commands/standard/convert.ts create mode 100644 src/commands/standard/mailbox clear.ts create mode 100644 src/commands/standard/mailbox messages.ts create mode 100644 src/commands/standard/mailbox settings.ts create mode 100644 src/interactions/mailbox/clear/confirm.ts create mode 100644 src/interactions/mailbox/send/initiate.ts create mode 100644 src/interactions/mailbox/send/modal.ts create mode 100644 src/interactions/mailbox/settings/update.ts diff --git a/package-lock.json b/package-lock.json index 24a29534..b65bc378 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,17 +11,17 @@ "license": "SEE LICENSE IN LICENSE", "dependencies": { "@discoin/scambio": "^2.2.0", - "@prisma/client": "^4.4.0", - "bufferutil": "^4.0.6", - "dayjs": "^1.11.5", - "discord-api-types": "^0.37.11", - "discord.js": "^14.5.0", + "@prisma/client": "^4.5.0", + "bufferutil": "^4.0.7", + "dayjs": "^1.11.6", + "discord-api-types": "^0.37.15", + "discord.js": "^14.6.0", "erlpack": "github:discordapp/erlpack", - "i18next": "^21.9.2", + "i18next": "^21.10.0", "node-schedule": "^2.1.0", "re2": "^1.17.7", "url-regex-safe": "^3.0.0", - "utf-8-validate": "^5.0.9", + "utf-8-validate": "^5.0.10", "uuid": "^9.0.0", "winston": "^3.8.2", "winston-daily-rotate-file": "^4.7.1", @@ -29,15 +29,15 @@ "zucc": "^0.1.2" }, "devDependencies": { - "@mermaid-js/mermaid-cli": "^9.1.6", + "@mermaid-js/mermaid-cli": "^9.1.7", "@tsconfig/node18": "^1.0.1", - "@types/node": "^18.7.23", + "@types/node": "^18.11.7", "@types/uuid": "^8.3.4", - "@typescript-eslint/eslint-plugin": "^5.38.1", - "@typescript-eslint/parser": "^5.38.1", + "@typescript-eslint/eslint-plugin": "^5.41.0", + "@typescript-eslint/parser": "^5.41.0", "cross-env": "^7.0.3", - "eslint": "^8.24.0", - "prisma": "^4.4.0", + "eslint": "^8.26.0", + "prisma": "^4.5.0", "prisma-erd-generator": "^1.2.1", "safe-regex": "^2.1.1", "transformer": "^1.2.8", @@ -92,12 +92,13 @@ } }, "node_modules/@discordjs/builders": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.2.0.tgz", - "integrity": "sha512-ARy4BUTMU+S0ZI6605NDqfWO+qZqV2d/xfY32z3hVSsd9IaAKJBZ1ILTZLy87oIjW8+gUpQmk9Kt0ZP9bmmd8Q==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.3.0.tgz", + "integrity": "sha512-Pvca6Nw8Hp+n3N+Wp17xjygXmMvggbh5ywUsOYE2Et4xkwwVRwgzxDJiMUuYapPtnYt4w/8aKlf5khc8ipLvhg==", "dependencies": { - "@sapphire/shapeshift": "^3.5.1", - "discord-api-types": "^0.37.3", + "@discordjs/util": "^0.1.0", + "@sapphire/shapeshift": "^3.7.0", + "discord-api-types": "^0.37.12", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "tslib": "^2.4.0" @@ -107,34 +108,43 @@ } }, "node_modules/@discordjs/collection": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.1.0.tgz", - "integrity": "sha512-PQ2Bv6pnT7aGPCKWbvvNRww5tYCGpggIQVgpuF9TdDPeR6n6vQYxezXiLVOS9z2B62Dp4c+qepQ15SgJbLYtCQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.2.0.tgz", + "integrity": "sha512-VvrrtGb7vbfPHzbhGq9qZB5o8FOB+kfazrxdt0OtxzSkoBuw9dURMkCwWizZ00+rDpiK2HmLHBZX+y6JsG9khw==", "engines": { "node": ">=16.9.0" } }, "node_modules/@discordjs/rest": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.2.0.tgz", - "integrity": "sha512-WX79uzMdnBzFNgsDdA440Ia2q7SMk6F8bNaPMmV4i6qcUNJpg+Sgb2spKuQmQPlNTX4HCntR609xHqUkK1tnVQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.3.0.tgz", + "integrity": "sha512-U6X5J+r/MxYpPTlHFuPxXEf92aKsBaD2teBC7sWkKILIr30O8c9+XshfL7KFBCavnAqS/qE+PF9fgRilO3N44g==", "dependencies": { - "@discordjs/collection": "^1.1.0", + "@discordjs/collection": "^1.2.0", + "@discordjs/util": "^0.1.0", "@sapphire/async-queue": "^1.5.0", "@sapphire/snowflake": "^3.2.2", - "discord-api-types": "^0.37.10", + "discord-api-types": "^0.37.12", "file-type": "^18.0.0", "tslib": "^2.4.0", - "undici": "^5.10.0" + "undici": "^5.11.0" }, "engines": { "node": ">=16.9.0" } }, + "node_modules/@discordjs/util": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.1.0.tgz", + "integrity": "sha512-e7d+PaTLVQav6rOc2tojh2y6FE8S7REkqLldq1XF4soCx74XB/DIjbVbVLtBemf0nLW77ntz0v+o5DytKwFNLQ==", + "engines": { + "node": ">=16.9.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", - "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -160,9 +170,9 @@ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" }, "node_modules/@humanwhocodes/config-array": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", - "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", + "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -173,16 +183,6 @@ "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -203,14 +203,14 @@ "dev": true }, "node_modules/@mermaid-js/mermaid-cli": { - "version": "9.1.6", - "resolved": "https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-9.1.6.tgz", - "integrity": "sha512-pE81Zfvni1qMAhqW4RkpwJ2L7Y5OFs+svSWq6cW5IQHWR8Dd8BBZL4p93GgqiVoLPTJ2heGVBKZFsgA2RPR6ng==", + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-9.1.7.tgz", + "integrity": "sha512-m7sAmOHhG6bmY1IEy+rSvyrQrKA/XIM6PFWP7w+3uW/C+uanPrIt0ieLL2NJfvfzLMkvEin1ClYE+pA6Y7Jwnw==", "dev": true, "dependencies": { "chalk": "^5.0.1", "commander": "^9.0.0", - "puppeteer": "^16.1.0" + "puppeteer": "^18.0.5" }, "bin": { "mmdc": "src/cli.js" @@ -307,12 +307,12 @@ } }, "node_modules/@prisma/client": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.4.0.tgz", - "integrity": "sha512-ciKOP246x1xwr04G9ajHlJ4pkmtu9Q6esVyqVBO0QJihaKQIUvbPjClp17IsRJyxqNpFm4ScbOc/s9DUzKHINQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.5.0.tgz", + "integrity": "sha512-B2cV0OPI1smhdYUxsJoLYQLoMlLH06MUxgFUWQnHodGMX98VRVXKmQE/9OcrTNkqtke5RC+YU24Szxd04tZA2g==", "hasInstallScript": true, "dependencies": { - "@prisma/engines-version": "4.4.0-66.f352a33b70356f46311da8b00d83386dd9f145d6" + "@prisma/engines-version": "4.5.0-43.0362da9eebca54d94c8ef5edd3b2e90af99ba452" }, "engines": { "node": ">=14.17" @@ -338,16 +338,16 @@ } }, "node_modules/@prisma/engines": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.4.0.tgz", - "integrity": "sha512-Fpykccxlt9MHrAs/QpPGpI2nOiRxuLA+LiApgA59ibbf24YICZIMWd3SI2YD+q0IAIso0jCGiHhirAIbxK3RyQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.5.0.tgz", + "integrity": "sha512-4t9ir2SbQQr/wMCNU4YpHWp5hU14J2m3wHUZnGJPpmBF8YtkisxyVyQsKd1e6FyLTaGq8LOLhm6VLYHKqKNm+g==", "devOptional": true, "hasInstallScript": true }, "node_modules/@prisma/engines-version": { - "version": "4.4.0-66.f352a33b70356f46311da8b00d83386dd9f145d6", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.4.0-66.f352a33b70356f46311da8b00d83386dd9f145d6.tgz", - "integrity": "sha512-P5v/PuEIJLYXZUZBvOLPqoyCW+m6StNqHdiR6te++gYVODpPdLakks5HVx3JaZIY+LwR02juJWFlwpc9Eog/ug==" + "version": "4.5.0-43.0362da9eebca54d94c8ef5edd3b2e90af99ba452", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.5.0-43.0362da9eebca54d94c8ef5edd3b2e90af99ba452.tgz", + "integrity": "sha512-o7LyVx8PPJBLrEzLl6lpxxk2D5VnlM4Fwmrbq0NoT6pr5aa1OuHD9ZG+WJY6TlR/iD9bhmo2LNcxddCMr5Rv2A==" }, "node_modules/@prisma/generator-helper": { "version": "4.4.0", @@ -371,9 +371,9 @@ } }, "node_modules/@sapphire/shapeshift": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.6.0.tgz", - "integrity": "sha512-tu2WLRdo5wotHRvsCkspg3qMiP6ETC3Q1dns1Q5V6zKUki+1itq6AbhMwohF9ZcLoYqg+Y8LkgRRtVxxTQVTBQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.7.0.tgz", + "integrity": "sha512-A6vI1zJoxhjWo4grsxpBRBgk96SqSdjLX5WlzKp9H+bJbkM07mvwcbtbVAmUZHbi/OG3HLfiZ1rlw4BhH6tsBQ==", "dependencies": { "fast-deep-equal": "^3.1.3", "lodash.uniqwith": "^4.5.0" @@ -442,9 +442,15 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.7.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz", - "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg==" + "version": "18.11.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.7.tgz", + "integrity": "sha512-LhFTglglr63mNXUSRYD8A+ZAIu5sFqNJ4Y2fPuY7UlrySJH87rRRlhtVmMHplmfk5WkoJGmDjE9oiTfyX94CpQ==" + }, + "node_modules/@types/semver": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "dev": true }, "node_modules/@types/uuid": { "version": "8.3.4", @@ -471,14 +477,14 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.38.1.tgz", - "integrity": "sha512-ky7EFzPhqz3XlhS7vPOoMDaQnQMn+9o5ICR9CPr/6bw8HrFkzhMSxuA3gRfiJVvs7geYrSeawGJjZoZQKCOglQ==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.41.0.tgz", + "integrity": "sha512-DXUS22Y57/LAFSg3x7Vi6RNAuLpTXwxB9S2nIA7msBb/Zt8p7XqMwdpdc1IU7CkOQUPgAqR5fWvxuKCbneKGmA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.38.1", - "@typescript-eslint/type-utils": "5.38.1", - "@typescript-eslint/utils": "5.38.1", + "@typescript-eslint/scope-manager": "5.41.0", + "@typescript-eslint/type-utils": "5.41.0", + "@typescript-eslint/utils": "5.41.0", "debug": "^4.3.4", "ignore": "^5.2.0", "regexpp": "^3.2.0", @@ -503,14 +509,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.38.1.tgz", - "integrity": "sha512-LDqxZBVFFQnQRz9rUZJhLmox+Ep5kdUmLatLQnCRR6523YV+XhRjfYzStQ4MheFA8kMAfUlclHSbu+RKdRwQKw==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.41.0.tgz", + "integrity": "sha512-HQVfix4+RL5YRWZboMD1pUfFN8MpRH4laziWkkAzyO1fvNOY/uinZcvo3QiFJVS/siNHupV8E5+xSwQZrl6PZA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.38.1", - "@typescript-eslint/types": "5.38.1", - "@typescript-eslint/typescript-estree": "5.38.1", + "@typescript-eslint/scope-manager": "5.41.0", + "@typescript-eslint/types": "5.41.0", + "@typescript-eslint/typescript-estree": "5.41.0", "debug": "^4.3.4" }, "engines": { @@ -530,13 +536,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.38.1.tgz", - "integrity": "sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.41.0.tgz", + "integrity": "sha512-xOxPJCnuktUkY2xoEZBKXO5DBCugFzjrVndKdUnyQr3+9aDWZReKq9MhaoVnbL+maVwWJu/N0SEtrtEUNb62QQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.38.1", - "@typescript-eslint/visitor-keys": "5.38.1" + "@typescript-eslint/types": "5.41.0", + "@typescript-eslint/visitor-keys": "5.41.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -547,13 +553,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.38.1.tgz", - "integrity": "sha512-UU3j43TM66gYtzo15ivK2ZFoDFKKP0k03MItzLdq0zV92CeGCXRfXlfQX5ILdd4/DSpHkSjIgLLLh1NtkOJOAw==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.41.0.tgz", + "integrity": "sha512-L30HNvIG6A1Q0R58e4hu4h+fZqaO909UcnnPbwKiN6Rc3BUEx6ez2wgN7aC0cBfcAjZfwkzE+E2PQQ9nEuoqfA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.38.1", - "@typescript-eslint/utils": "5.38.1", + "@typescript-eslint/typescript-estree": "5.41.0", + "@typescript-eslint/utils": "5.41.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -574,9 +580,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.38.1.tgz", - "integrity": "sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.41.0.tgz", + "integrity": "sha512-5BejraMXMC+2UjefDvrH0Fo/eLwZRV6859SXRg+FgbhA0R0l6lDqDGAQYhKbXhPN2ofk2kY5sgGyLNL907UXpA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -587,13 +593,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.1.tgz", - "integrity": "sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.41.0.tgz", + "integrity": "sha512-SlzFYRwFSvswzDSQ/zPkIWcHv8O5y42YUskko9c4ki+fV6HATsTODUPbRbcGDFYP86gaJL5xohUEytvyNNcXWg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.38.1", - "@typescript-eslint/visitor-keys": "5.38.1", + "@typescript-eslint/types": "5.41.0", + "@typescript-eslint/visitor-keys": "5.41.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -614,17 +620,19 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.38.1.tgz", - "integrity": "sha512-oIuUiVxPBsndrN81oP8tXnFa/+EcZ03qLqPDfSZ5xIJVm7A9V0rlkQwwBOAGtrdN70ZKDlKv+l1BeT4eSFxwXA==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.41.0.tgz", + "integrity": "sha512-QlvfwaN9jaMga9EBazQ+5DDx/4sAdqDkcs05AsQHMaopluVCUyu1bTRUVKzXbgjDlrRAQrYVoi/sXJ9fmG+KLQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.38.1", - "@typescript-eslint/types": "5.38.1", - "@typescript-eslint/typescript-estree": "5.38.1", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.41.0", + "@typescript-eslint/types": "5.41.0", + "@typescript-eslint/typescript-estree": "5.41.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -638,12 +646,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.1.tgz", - "integrity": "sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.41.0.tgz", + "integrity": "sha512-vilqeHj267v8uzzakbm13HkPMl7cbYpKVjgFWZPIOHIJHZtinvypUhJ5xBXfWYg4eFKqztbMMpOgFpT9Gfx4fw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.38.1", + "@typescript-eslint/types": "5.41.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -671,9 +679,9 @@ } }, "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -925,9 +933,9 @@ } }, "node_modules/bufferutil": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", - "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -936,6 +944,17 @@ "node": ">=6.14.2" } }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, "node_modules/cacache": { "version": "16.1.1", "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.1.tgz", @@ -1220,9 +1239,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.5", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.5.tgz", - "integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==" + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", + "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==" }, "node_modules/debug": { "version": "4.3.4", @@ -1284,9 +1303,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1019158", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1019158.tgz", - "integrity": "sha512-wvq+KscQ7/6spEV7czhnZc9RM/woz1AY+/Vpd8/h2HFMwJSdTliu7f/yr1A6vDdJfKICZsShqsYpEQbdhg8AFQ==", + "version": "0.0.1045489", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz", + "integrity": "sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ==", "dev": true }, "node_modules/dir-glob": { @@ -1302,51 +1321,32 @@ } }, "node_modules/discord-api-types": { - "version": "0.37.11", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.11.tgz", - "integrity": "sha512-cUNXrCdD4hEj5iJ9SligTNur64rNnLX5s6CbvmatRpWKMZtrLTOlyLhuXmVbjfDXeXH7os8Qb71Wa7IEhC27Sw==" + "version": "0.37.15", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.15.tgz", + "integrity": "sha512-2SpscsamTtctJflnz1J6cPp99PLs10DNGi2rrOdjID3KhP1nwsoJHPvcLe6zwcYxZnRdA/71M85RCNOQl83u1A==" }, "node_modules/discord.js": { - "version": "14.5.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.5.0.tgz", - "integrity": "sha512-Kd5OqdeiXe3t9eHUHCzf1r3LmKpeJJ7lKqwlWX1qdC0WfsbO2K3kucIDLfe0INnZVZaErUQ6/U6kGbTDnGgwZg==", - "dependencies": { - "@discordjs/builders": "^1.2.0", - "@discordjs/collection": "^1.1.0", - "@discordjs/rest": "^1.2.0", + "version": "14.6.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.6.0.tgz", + "integrity": "sha512-On1K7xpJZRe0KsziIaDih2ksYPhgxym/ZqV45i1f3yig4vUotikqs7qp5oXiTzQ/UTiNRCixUWFTh7vA1YBCqw==", + "dependencies": { + "@discordjs/builders": "^1.3.0", + "@discordjs/collection": "^1.2.0", + "@discordjs/rest": "^1.3.0", + "@discordjs/util": "^0.1.0", "@sapphire/snowflake": "^3.2.2", "@types/ws": "^8.5.3", - "discord-api-types": "^0.37.10", + "discord-api-types": "^0.37.12", "fast-deep-equal": "^3.1.3", "lodash.snakecase": "^4.1.1", "tslib": "^2.4.0", - "undici": "^5.10.0", + "undici": "^5.11.0", "ws": "^8.9.0" }, "engines": { "node": ">=16.9.0" } }, - "node_modules/discord.js/node_modules/ws": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", - "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1432,15 +1432,15 @@ } }, "node_modules/eslint": { - "version": "8.24.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.24.0.tgz", - "integrity": "sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", + "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.2", - "@humanwhocodes/config-array": "^0.10.5", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.11.6", "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -1456,14 +1456,14 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "glob-parent": "^6.0.1", + "glob-parent": "^6.0.2", "globals": "^13.15.0", - "globby": "^11.1.0", "grapheme-splitter": "^1.0.4", "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-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", @@ -1669,9 +1669,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -2091,9 +2091,9 @@ } }, "node_modules/i18next": { - "version": "21.9.2", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-21.9.2.tgz", - "integrity": "sha512-00fVrLQOwy45nm3OtC9l1WiLK3nJlIYSljgCt0qzTaAy65aciMdRy9GsuW+a2AtKtdg9/njUGfRH30LRupV7ZQ==", + "version": "21.10.0", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-21.10.0.tgz", + "integrity": "sha512-YeuIBmFsGjUfO3qBmMOc0rQaun4mIpGKET5WDwvu8lU7gvwpcariZLNtL0Fzj+zazcHUrlXHiptcFhBMFaxzfg==", "funding": [ { "type": "individual", @@ -2288,6 +2288,15 @@ "node": ">=0.12.0" } }, + "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, + "engines": { + "node": ">=8" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -2951,13 +2960,13 @@ } }, "node_modules/prisma": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.4.0.tgz", - "integrity": "sha512-l/QKLmLcKJQFuc+X02LyICo0NWTUVaNNZ00jKJBqwDyhwMAhboD1FWwYV50rkH4Wls0RviAJSFzkC2ZrfawpfA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.5.0.tgz", + "integrity": "sha512-9Aeg4qiKlv9Wsjz4NO8k2CzRzlvS3A4FYVJ5+28sBBZ0eEwbiVOE/Jj7v6rZC1tFW2s4GSICQOAyuOjc6WsNew==", "devOptional": true, "hasInstallScript": true, "dependencies": { - "@prisma/engines": "4.4.0" + "@prisma/engines": "4.5.0" }, "bin": { "prisma": "build/index.js", @@ -3042,23 +3051,37 @@ } }, "node_modules/puppeteer": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-16.2.0.tgz", - "integrity": "sha512-7Au6iC98rS6WEAD110V4Bxd0iIbqoFtzz9XzkG1BSofidS1VAJ881E1+GFR7Xn2Yea0hbj8n0ErzRyseMp1Ctg==", + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-18.2.1.tgz", + "integrity": "sha512-7+UhmYa7wxPh2oMRwA++k8UGVDxh3YdWFB52r9C3tM81T6BU7cuusUSxImz0GEYSOYUKk/YzIhkQ6+vc0gHbxQ==", "dev": true, "hasInstallScript": true, + "dependencies": { + "https-proxy-agent": "5.0.1", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "puppeteer-core": "18.2.1" + }, + "engines": { + "node": ">=14.1.0" + } + }, + "node_modules/puppeteer-core": { + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-18.2.1.tgz", + "integrity": "sha512-MRtTAZfQTluz3U2oU/X2VqVWPcR1+94nbA2V6ZrSZRVEwLqZ8eclZ551qGFQD/vD2PYqHJwWOW/fpC721uznVw==", + "dev": true, "dependencies": { "cross-fetch": "3.1.5", "debug": "4.3.4", - "devtools-protocol": "0.0.1019158", + "devtools-protocol": "0.0.1045489", "extract-zip": "2.0.1", "https-proxy-agent": "5.0.1", - "progress": "2.0.3", "proxy-from-env": "1.1.0", "rimraf": "3.0.2", "tar-fs": "2.1.1", "unbzip2-stream": "1.4.3", - "ws": "8.8.1" + "ws": "8.9.0" }, "engines": { "node": ">=14.1.0" @@ -3440,6 +3463,14 @@ "node": "*" } }, + "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/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -3738,9 +3769,12 @@ } }, "node_modules/undici": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.10.0.tgz", - "integrity": "sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g==", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.12.0.tgz", + "integrity": "sha512-zMLamCG62PGjd9HHMpo05bSLvvwWOZgGeiWlN/vlqu3+lRo3elxktVGEyLMX+IO7c2eflLjcW74AlkhEZm15mg==", + "dependencies": { + "busboy": "^1.6.0" + }, "engines": { "node": ">=12.18" } @@ -3791,9 +3825,9 @@ } }, "node_modules/utf-8-validate": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", - "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -3919,10 +3953,9 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", - "dev": true, + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", + "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", "engines": { "node": ">=10.0.0" }, @@ -4020,40 +4053,47 @@ } }, "@discordjs/builders": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.2.0.tgz", - "integrity": "sha512-ARy4BUTMU+S0ZI6605NDqfWO+qZqV2d/xfY32z3hVSsd9IaAKJBZ1ILTZLy87oIjW8+gUpQmk9Kt0ZP9bmmd8Q==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.3.0.tgz", + "integrity": "sha512-Pvca6Nw8Hp+n3N+Wp17xjygXmMvggbh5ywUsOYE2Et4xkwwVRwgzxDJiMUuYapPtnYt4w/8aKlf5khc8ipLvhg==", "requires": { - "@sapphire/shapeshift": "^3.5.1", - "discord-api-types": "^0.37.3", + "@discordjs/util": "^0.1.0", + "@sapphire/shapeshift": "^3.7.0", + "discord-api-types": "^0.37.12", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "tslib": "^2.4.0" } }, "@discordjs/collection": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.1.0.tgz", - "integrity": "sha512-PQ2Bv6pnT7aGPCKWbvvNRww5tYCGpggIQVgpuF9TdDPeR6n6vQYxezXiLVOS9z2B62Dp4c+qepQ15SgJbLYtCQ==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.2.0.tgz", + "integrity": "sha512-VvrrtGb7vbfPHzbhGq9qZB5o8FOB+kfazrxdt0OtxzSkoBuw9dURMkCwWizZ00+rDpiK2HmLHBZX+y6JsG9khw==" }, "@discordjs/rest": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.2.0.tgz", - "integrity": "sha512-WX79uzMdnBzFNgsDdA440Ia2q7SMk6F8bNaPMmV4i6qcUNJpg+Sgb2spKuQmQPlNTX4HCntR609xHqUkK1tnVQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.3.0.tgz", + "integrity": "sha512-U6X5J+r/MxYpPTlHFuPxXEf92aKsBaD2teBC7sWkKILIr30O8c9+XshfL7KFBCavnAqS/qE+PF9fgRilO3N44g==", "requires": { - "@discordjs/collection": "^1.1.0", + "@discordjs/collection": "^1.2.0", + "@discordjs/util": "^0.1.0", "@sapphire/async-queue": "^1.5.0", "@sapphire/snowflake": "^3.2.2", - "discord-api-types": "^0.37.10", + "discord-api-types": "^0.37.12", "file-type": "^18.0.0", "tslib": "^2.4.0", - "undici": "^5.10.0" + "undici": "^5.11.0" } }, + "@discordjs/util": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.1.0.tgz", + "integrity": "sha512-e7d+PaTLVQav6rOc2tojh2y6FE8S7REkqLldq1XF4soCx74XB/DIjbVbVLtBemf0nLW77ntz0v+o5DytKwFNLQ==" + }, "@eslint/eslintrc": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", - "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -4073,9 +4113,9 @@ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" }, "@humanwhocodes/config-array": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", - "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", + "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -4083,12 +4123,6 @@ "minimatch": "^3.0.4" } }, - "@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true - }, "@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -4102,14 +4136,14 @@ "dev": true }, "@mermaid-js/mermaid-cli": { - "version": "9.1.6", - "resolved": "https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-9.1.6.tgz", - "integrity": "sha512-pE81Zfvni1qMAhqW4RkpwJ2L7Y5OFs+svSWq6cW5IQHWR8Dd8BBZL4p93GgqiVoLPTJ2heGVBKZFsgA2RPR6ng==", + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-9.1.7.tgz", + "integrity": "sha512-m7sAmOHhG6bmY1IEy+rSvyrQrKA/XIM6PFWP7w+3uW/C+uanPrIt0ieLL2NJfvfzLMkvEin1ClYE+pA6Y7Jwnw==", "dev": true, "requires": { "chalk": "^5.0.1", "commander": "^9.0.0", - "puppeteer": "^16.1.0" + "puppeteer": "^18.0.5" }, "dependencies": { "chalk": { @@ -4181,11 +4215,11 @@ } }, "@prisma/client": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.4.0.tgz", - "integrity": "sha512-ciKOP246x1xwr04G9ajHlJ4pkmtu9Q6esVyqVBO0QJihaKQIUvbPjClp17IsRJyxqNpFm4ScbOc/s9DUzKHINQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.5.0.tgz", + "integrity": "sha512-B2cV0OPI1smhdYUxsJoLYQLoMlLH06MUxgFUWQnHodGMX98VRVXKmQE/9OcrTNkqtke5RC+YU24Szxd04tZA2g==", "requires": { - "@prisma/engines-version": "4.4.0-66.f352a33b70356f46311da8b00d83386dd9f145d6" + "@prisma/engines-version": "4.5.0-43.0362da9eebca54d94c8ef5edd3b2e90af99ba452" } }, "@prisma/debug": { @@ -4200,15 +4234,15 @@ } }, "@prisma/engines": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.4.0.tgz", - "integrity": "sha512-Fpykccxlt9MHrAs/QpPGpI2nOiRxuLA+LiApgA59ibbf24YICZIMWd3SI2YD+q0IAIso0jCGiHhirAIbxK3RyQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.5.0.tgz", + "integrity": "sha512-4t9ir2SbQQr/wMCNU4YpHWp5hU14J2m3wHUZnGJPpmBF8YtkisxyVyQsKd1e6FyLTaGq8LOLhm6VLYHKqKNm+g==", "devOptional": true }, "@prisma/engines-version": { - "version": "4.4.0-66.f352a33b70356f46311da8b00d83386dd9f145d6", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.4.0-66.f352a33b70356f46311da8b00d83386dd9f145d6.tgz", - "integrity": "sha512-P5v/PuEIJLYXZUZBvOLPqoyCW+m6StNqHdiR6te++gYVODpPdLakks5HVx3JaZIY+LwR02juJWFlwpc9Eog/ug==" + "version": "4.5.0-43.0362da9eebca54d94c8ef5edd3b2e90af99ba452", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.5.0-43.0362da9eebca54d94c8ef5edd3b2e90af99ba452.tgz", + "integrity": "sha512-o7LyVx8PPJBLrEzLl6lpxxk2D5VnlM4Fwmrbq0NoT6pr5aa1OuHD9ZG+WJY6TlR/iD9bhmo2LNcxddCMr5Rv2A==" }, "@prisma/generator-helper": { "version": "4.4.0", @@ -4228,9 +4262,9 @@ "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==" }, "@sapphire/shapeshift": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.6.0.tgz", - "integrity": "sha512-tu2WLRdo5wotHRvsCkspg3qMiP6ETC3Q1dns1Q5V6zKUki+1itq6AbhMwohF9ZcLoYqg+Y8LkgRRtVxxTQVTBQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.7.0.tgz", + "integrity": "sha512-A6vI1zJoxhjWo4grsxpBRBgk96SqSdjLX5WlzKp9H+bJbkM07mvwcbtbVAmUZHbi/OG3HLfiZ1rlw4BhH6tsBQ==", "requires": { "fast-deep-equal": "^3.1.3", "lodash.uniqwith": "^4.5.0" @@ -4288,9 +4322,15 @@ "dev": true }, "@types/node": { - "version": "18.7.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz", - "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg==" + "version": "18.11.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.7.tgz", + "integrity": "sha512-LhFTglglr63mNXUSRYD8A+ZAIu5sFqNJ4Y2fPuY7UlrySJH87rRRlhtVmMHplmfk5WkoJGmDjE9oiTfyX94CpQ==" + }, + "@types/semver": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "dev": true }, "@types/uuid": { "version": "8.3.4", @@ -4317,14 +4357,14 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.38.1.tgz", - "integrity": "sha512-ky7EFzPhqz3XlhS7vPOoMDaQnQMn+9o5ICR9CPr/6bw8HrFkzhMSxuA3gRfiJVvs7geYrSeawGJjZoZQKCOglQ==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.41.0.tgz", + "integrity": "sha512-DXUS22Y57/LAFSg3x7Vi6RNAuLpTXwxB9S2nIA7msBb/Zt8p7XqMwdpdc1IU7CkOQUPgAqR5fWvxuKCbneKGmA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.38.1", - "@typescript-eslint/type-utils": "5.38.1", - "@typescript-eslint/utils": "5.38.1", + "@typescript-eslint/scope-manager": "5.41.0", + "@typescript-eslint/type-utils": "5.41.0", + "@typescript-eslint/utils": "5.41.0", "debug": "^4.3.4", "ignore": "^5.2.0", "regexpp": "^3.2.0", @@ -4333,53 +4373,53 @@ } }, "@typescript-eslint/parser": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.38.1.tgz", - "integrity": "sha512-LDqxZBVFFQnQRz9rUZJhLmox+Ep5kdUmLatLQnCRR6523YV+XhRjfYzStQ4MheFA8kMAfUlclHSbu+RKdRwQKw==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.41.0.tgz", + "integrity": "sha512-HQVfix4+RL5YRWZboMD1pUfFN8MpRH4laziWkkAzyO1fvNOY/uinZcvo3QiFJVS/siNHupV8E5+xSwQZrl6PZA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.38.1", - "@typescript-eslint/types": "5.38.1", - "@typescript-eslint/typescript-estree": "5.38.1", + "@typescript-eslint/scope-manager": "5.41.0", + "@typescript-eslint/types": "5.41.0", + "@typescript-eslint/typescript-estree": "5.41.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.38.1.tgz", - "integrity": "sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.41.0.tgz", + "integrity": "sha512-xOxPJCnuktUkY2xoEZBKXO5DBCugFzjrVndKdUnyQr3+9aDWZReKq9MhaoVnbL+maVwWJu/N0SEtrtEUNb62QQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.38.1", - "@typescript-eslint/visitor-keys": "5.38.1" + "@typescript-eslint/types": "5.41.0", + "@typescript-eslint/visitor-keys": "5.41.0" } }, "@typescript-eslint/type-utils": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.38.1.tgz", - "integrity": "sha512-UU3j43TM66gYtzo15ivK2ZFoDFKKP0k03MItzLdq0zV92CeGCXRfXlfQX5ILdd4/DSpHkSjIgLLLh1NtkOJOAw==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.41.0.tgz", + "integrity": "sha512-L30HNvIG6A1Q0R58e4hu4h+fZqaO909UcnnPbwKiN6Rc3BUEx6ez2wgN7aC0cBfcAjZfwkzE+E2PQQ9nEuoqfA==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.38.1", - "@typescript-eslint/utils": "5.38.1", + "@typescript-eslint/typescript-estree": "5.41.0", + "@typescript-eslint/utils": "5.41.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.38.1.tgz", - "integrity": "sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.41.0.tgz", + "integrity": "sha512-5BejraMXMC+2UjefDvrH0Fo/eLwZRV6859SXRg+FgbhA0R0l6lDqDGAQYhKbXhPN2ofk2kY5sgGyLNL907UXpA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.1.tgz", - "integrity": "sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.41.0.tgz", + "integrity": "sha512-SlzFYRwFSvswzDSQ/zPkIWcHv8O5y42YUskko9c4ki+fV6HATsTODUPbRbcGDFYP86gaJL5xohUEytvyNNcXWg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.38.1", - "@typescript-eslint/visitor-keys": "5.38.1", + "@typescript-eslint/types": "5.41.0", + "@typescript-eslint/visitor-keys": "5.41.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -4388,26 +4428,28 @@ } }, "@typescript-eslint/utils": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.38.1.tgz", - "integrity": "sha512-oIuUiVxPBsndrN81oP8tXnFa/+EcZ03qLqPDfSZ5xIJVm7A9V0rlkQwwBOAGtrdN70ZKDlKv+l1BeT4eSFxwXA==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.41.0.tgz", + "integrity": "sha512-QlvfwaN9jaMga9EBazQ+5DDx/4sAdqDkcs05AsQHMaopluVCUyu1bTRUVKzXbgjDlrRAQrYVoi/sXJ9fmG+KLQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.38.1", - "@typescript-eslint/types": "5.38.1", - "@typescript-eslint/typescript-estree": "5.38.1", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.41.0", + "@typescript-eslint/types": "5.41.0", + "@typescript-eslint/typescript-estree": "5.41.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" } }, "@typescript-eslint/visitor-keys": { - "version": "5.38.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.1.tgz", - "integrity": "sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.41.0.tgz", + "integrity": "sha512-vilqeHj267v8uzzakbm13HkPMl7cbYpKVjgFWZPIOHIJHZtinvypUhJ5xBXfWYg4eFKqztbMMpOgFpT9Gfx4fw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.38.1", + "@typescript-eslint/types": "5.41.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -4425,9 +4467,9 @@ } }, "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true }, "acorn-jsx": { @@ -4609,13 +4651,21 @@ "dev": true }, "bufferutil": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", - "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", "requires": { "node-gyp-build": "^4.3.0" } }, + "busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "requires": { + "streamsearch": "^1.1.0" + } + }, "cacache": { "version": "16.1.1", "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.1.tgz", @@ -4838,9 +4888,9 @@ "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==" }, "dayjs": { - "version": "1.11.5", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.5.tgz", - "integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==" + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", + "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==" }, "debug": { "version": "4.3.4", @@ -4885,9 +4935,9 @@ "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==" }, "devtools-protocol": { - "version": "0.0.1019158", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1019158.tgz", - "integrity": "sha512-wvq+KscQ7/6spEV7czhnZc9RM/woz1AY+/Vpd8/h2HFMwJSdTliu7f/yr1A6vDdJfKICZsShqsYpEQbdhg8AFQ==", + "version": "0.0.1045489", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz", + "integrity": "sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ==", "dev": true }, "dir-glob": { @@ -4900,34 +4950,27 @@ } }, "discord-api-types": { - "version": "0.37.11", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.11.tgz", - "integrity": "sha512-cUNXrCdD4hEj5iJ9SligTNur64rNnLX5s6CbvmatRpWKMZtrLTOlyLhuXmVbjfDXeXH7os8Qb71Wa7IEhC27Sw==" + "version": "0.37.15", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.15.tgz", + "integrity": "sha512-2SpscsamTtctJflnz1J6cPp99PLs10DNGi2rrOdjID3KhP1nwsoJHPvcLe6zwcYxZnRdA/71M85RCNOQl83u1A==" }, "discord.js": { - "version": "14.5.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.5.0.tgz", - "integrity": "sha512-Kd5OqdeiXe3t9eHUHCzf1r3LmKpeJJ7lKqwlWX1qdC0WfsbO2K3kucIDLfe0INnZVZaErUQ6/U6kGbTDnGgwZg==", - "requires": { - "@discordjs/builders": "^1.2.0", - "@discordjs/collection": "^1.1.0", - "@discordjs/rest": "^1.2.0", + "version": "14.6.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.6.0.tgz", + "integrity": "sha512-On1K7xpJZRe0KsziIaDih2ksYPhgxym/ZqV45i1f3yig4vUotikqs7qp5oXiTzQ/UTiNRCixUWFTh7vA1YBCqw==", + "requires": { + "@discordjs/builders": "^1.3.0", + "@discordjs/collection": "^1.2.0", + "@discordjs/rest": "^1.3.0", + "@discordjs/util": "^0.1.0", "@sapphire/snowflake": "^3.2.2", "@types/ws": "^8.5.3", - "discord-api-types": "^0.37.10", + "discord-api-types": "^0.37.12", "fast-deep-equal": "^3.1.3", "lodash.snakecase": "^4.1.1", "tslib": "^2.4.0", - "undici": "^5.10.0", + "undici": "^5.11.0", "ws": "^8.9.0" - }, - "dependencies": { - "ws": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", - "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", - "requires": {} - } } }, "doctrine": { @@ -4998,15 +5041,15 @@ "dev": true }, "eslint": { - "version": "8.24.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.24.0.tgz", - "integrity": "sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", + "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.2", - "@humanwhocodes/config-array": "^0.10.5", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.11.6", "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -5022,14 +5065,14 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "glob-parent": "^6.0.1", + "glob-parent": "^6.0.2", "globals": "^13.15.0", - "globby": "^11.1.0", "grapheme-splitter": "^1.0.4", "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-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", @@ -5175,9 +5218,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -5507,9 +5550,9 @@ } }, "i18next": { - "version": "21.9.2", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-21.9.2.tgz", - "integrity": "sha512-00fVrLQOwy45nm3OtC9l1WiLK3nJlIYSljgCt0qzTaAy65aciMdRy9GsuW+a2AtKtdg9/njUGfRH30LRupV7ZQ==", + "version": "21.10.0", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-21.10.0.tgz", + "integrity": "sha512-YeuIBmFsGjUfO3qBmMOc0rQaun4mIpGKET5WDwvu8lU7gvwpcariZLNtL0Fzj+zazcHUrlXHiptcFhBMFaxzfg==", "requires": { "@babel/runtime": "^7.17.2" } @@ -5633,6 +5676,12 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "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 + }, "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -6113,12 +6162,12 @@ "dev": true }, "prisma": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.4.0.tgz", - "integrity": "sha512-l/QKLmLcKJQFuc+X02LyICo0NWTUVaNNZ00jKJBqwDyhwMAhboD1FWwYV50rkH4Wls0RviAJSFzkC2ZrfawpfA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.5.0.tgz", + "integrity": "sha512-9Aeg4qiKlv9Wsjz4NO8k2CzRzlvS3A4FYVJ5+28sBBZ0eEwbiVOE/Jj7v6rZC1tFW2s4GSICQOAyuOjc6WsNew==", "devOptional": true, "requires": { - "@prisma/engines": "4.4.0" + "@prisma/engines": "4.5.0" } }, "prisma-erd-generator": { @@ -6176,22 +6225,33 @@ "dev": true }, "puppeteer": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-16.2.0.tgz", - "integrity": "sha512-7Au6iC98rS6WEAD110V4Bxd0iIbqoFtzz9XzkG1BSofidS1VAJ881E1+GFR7Xn2Yea0hbj8n0ErzRyseMp1Ctg==", + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-18.2.1.tgz", + "integrity": "sha512-7+UhmYa7wxPh2oMRwA++k8UGVDxh3YdWFB52r9C3tM81T6BU7cuusUSxImz0GEYSOYUKk/YzIhkQ6+vc0gHbxQ==", + "dev": true, + "requires": { + "https-proxy-agent": "5.0.1", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "puppeteer-core": "18.2.1" + } + }, + "puppeteer-core": { + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-18.2.1.tgz", + "integrity": "sha512-MRtTAZfQTluz3U2oU/X2VqVWPcR1+94nbA2V6ZrSZRVEwLqZ8eclZ551qGFQD/vD2PYqHJwWOW/fpC721uznVw==", "dev": true, "requires": { "cross-fetch": "3.1.5", "debug": "4.3.4", - "devtools-protocol": "0.0.1019158", + "devtools-protocol": "0.0.1045489", "extract-zip": "2.0.1", "https-proxy-agent": "5.0.1", - "progress": "2.0.3", "proxy-from-env": "1.1.0", "rimraf": "3.0.2", "tar-fs": "2.1.1", "unbzip2-stream": "1.4.3", - "ws": "8.8.1" + "ws": "8.9.0" } }, "qs": { @@ -6449,6 +6509,11 @@ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==" }, + "streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==" + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -6688,9 +6753,12 @@ } }, "undici": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.10.0.tgz", - "integrity": "sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g==" + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.12.0.tgz", + "integrity": "sha512-zMLamCG62PGjd9HHMpo05bSLvvwWOZgGeiWlN/vlqu3+lRo3elxktVGEyLMX+IO7c2eflLjcW74AlkhEZm15mg==", + "requires": { + "busboy": "^1.6.0" + } }, "unique-filename": { "version": "1.1.1", @@ -6727,9 +6795,9 @@ } }, "utf-8-validate": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", - "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "requires": { "node-gyp-build": "^4.3.0" } @@ -6827,10 +6895,9 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", - "dev": true, + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", + "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", "requires": {} }, "yallist": { diff --git a/package.json b/package.json index 12d104bc..d33a03bf 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "echo \"Error: we haven't set up testing yet.\" && exit 1", "postinstall": "prisma generate", - "diagram": "prisma generate erd" + "diagram": "prisma generate erd" }, "repository": { "type": "git", @@ -34,17 +34,17 @@ }, "dependencies": { "@discoin/scambio": "^2.2.0", - "@prisma/client": "^4.4.0", - "bufferutil": "^4.0.6", - "dayjs": "^1.11.5", - "discord-api-types": "^0.37.11", - "discord.js": "^14.5.0", + "@prisma/client": "^4.5.0", + "bufferutil": "^4.0.7", + "dayjs": "^1.11.6", + "discord-api-types": "^0.37.15", + "discord.js": "^14.6.0", "erlpack": "github:discordapp/erlpack", - "i18next": "^21.9.2", + "i18next": "^21.10.0", "node-schedule": "^2.1.0", "re2": "^1.17.7", "url-regex-safe": "^3.0.0", - "utf-8-validate": "^5.0.9", + "utf-8-validate": "^5.0.10", "uuid": "^9.0.0", "winston": "^3.8.2", "winston-daily-rotate-file": "^4.7.1", @@ -52,15 +52,15 @@ "zucc": "^0.1.2" }, "devDependencies": { - "@mermaid-js/mermaid-cli": "^9.1.6", + "@mermaid-js/mermaid-cli": "^9.1.7", "@tsconfig/node18": "^1.0.1", - "@types/node": "^18.7.23", + "@types/node": "^18.11.7", "@types/uuid": "^8.3.4", - "@typescript-eslint/eslint-plugin": "^5.38.1", - "@typescript-eslint/parser": "^5.38.1", + "@typescript-eslint/eslint-plugin": "^5.41.0", + "@typescript-eslint/parser": "^5.41.0", "cross-env": "^7.0.3", - "eslint": "^8.24.0", - "prisma": "^4.4.0", + "eslint": "^8.26.0", + "prisma": "^4.5.0", "prisma-erd-generator": "^1.2.1", "safe-regex": "^2.1.1", "transformer": "^1.2.8", diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 43afb3cb..d380f98b 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -27,6 +27,25 @@ type numberVIP { name String } +type mailboxMessage { + id String + from String + message String + + sent atAndBy +} + +model Mailbox { + number String @id @map("_id") + + autoreply String @default(value: "Sorry, I am currently unavailable. Please call again later.") + receiving Boolean @default(value: true) + messages mailboxMessage[] + + + numberDoc Numbers? +} + model Numbers { number String @id @map("_id") channelID String @@ -35,12 +54,14 @@ model Numbers { blocked String[] contacts String[] expiry DateTime - mentions String[] + mentions String[] promote numberPromote? vip numberVIP? waiting Boolean @default(false) createdAt DateTime @default(now()) + mailbox Mailbox? @relation(fields: [number], references: [number]) + outgoingCalls Calls[] @relation("to") incomingCalls Calls[] @relation("from") @@ -58,7 +79,7 @@ type atAndBy { } type onHold { - onHold Boolean + onHold Boolean holdingSide String? // channel ID of holding side (maybe change this later) } diff --git a/src/TODO b/src/TODO index 5dd5fb6e..79f5f877 100644 --- a/src/TODO +++ b/src/TODO @@ -1,7 +1,6 @@ General: logging everywhere (in the support guild) Guild events if needed - 611 Finish localization 411 ** Rush Rollout ASAP ** @@ -36,9 +35,9 @@ upgrade allow backdoor -handover + -hold + @@ -76,4 +75,6 @@ stats unvip ----- Pipe Dream ----- -refactor command types to have their own specific classes, perhaps building in their own permission checking \ No newline at end of file +refactor command types to have their own specific classes, perhaps building in their own permission checking +030x xxx xxxx formatting + i18next@latest \ No newline at end of file diff --git a/src/commands/standard/call.ts b/src/commands/standard/call.ts index b59a2244..d18ffa1f 100644 --- a/src/commands/standard/call.ts +++ b/src/commands/standard/call.ts @@ -103,7 +103,7 @@ export default class Call extends Command { const embed = EmbedBuilder.from(this.t("twoThreeThree.baseEmbed", { canAfford: this.account!.balance > 500 ? "canAfford" : "cantAfford", - })); + }) as APIEmbed); embed .setColor(isVIP ? this.config.colors.yellowbook : this.config.colors.info) .setAuthor({ diff --git a/src/commands/standard/convert.ts b/src/commands/standard/convert.ts new file mode 100644 index 00000000..27d0a195 --- /dev/null +++ b/src/commands/standard/convert.ts @@ -0,0 +1,12 @@ +import Command from "../../internals/commandProcessor"; +import discoin from "@discoin/scambio"; + +import auth from "../../config/auth"; + +const dClient = new discoin(auth.discoin.token, ["DTS"]); + +export default class Convert extends Command { + async run(): Promise { + + } +} \ No newline at end of file diff --git a/src/commands/standard/mailbox clear.ts b/src/commands/standard/mailbox clear.ts new file mode 100644 index 00000000..8f647d4b --- /dev/null +++ b/src/commands/standard/mailbox clear.ts @@ -0,0 +1,30 @@ +import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js"; +import Command from "../../internals/commandProcessor"; + +export default class MailboxClear extends Command { + async run(): Promise { + const mailbox = await this.fetchMailbox(); + + if (mailbox.messages.length === 0) { + this.interaction.reply({ + embeds: [this.client.errorEmbed("Your mailbox is already empty!")], + ephemeral: true, + }); + return; + } + + this.interaction.reply({ + embeds: [this.client.warningEmbed("Are you sure you want to do this? Your messages cannot be recovered.")], + components: [ + new ActionRowBuilder().addComponents([ + new ButtonBuilder() + .setCustomId("mailbox-clear-confirm") + .setEmoji("👍") + .setLabel("Confirm") + .setStyle(ButtonStyle.Danger), + ]), + ], + ephemeral: true, + }); + } +} diff --git a/src/commands/standard/mailbox messages.ts b/src/commands/standard/mailbox messages.ts new file mode 100644 index 00000000..3ff539e2 --- /dev/null +++ b/src/commands/standard/mailbox messages.ts @@ -0,0 +1,14 @@ +import { EmbedBuilder } from "discord.js"; +import Command from "../../internals/commandProcessor"; + +export default class MailboxMessages extends Command { + async run(): Promise { + const mailbox = await this.fetchMailbox(); + + const embed = new EmbedBuilder() + .setColor(this.config.colors.info) + .setTitle(`📬 You have ${mailbox.messages.length} messages.`); + + if (mailbox.messages.length === 0) {} + } +} diff --git a/src/commands/standard/mailbox settings.ts b/src/commands/standard/mailbox settings.ts new file mode 100644 index 00000000..be06a2f9 --- /dev/null +++ b/src/commands/standard/mailbox settings.ts @@ -0,0 +1,37 @@ +import { ActionRowBuilder } from "@discordjs/builders"; +import { ModalBuilder, TextInputBuilder, TextInputStyle } from "discord.js"; +import Command from "../../internals/commandProcessor"; + +export default class MailboxSettings extends Command { + async run(): Promise { + const mailbox = await this.fetchMailbox(); + + const modal = new ModalBuilder() + .setCustomId("mailbox-settings-update") + .setTitle("Mailbox Settings") + .addComponents([ + new ActionRowBuilder().addComponents([ + new TextInputBuilder() + .setCustomId("autoreply") + .setValue(mailbox.autoreply) + .setLabel("Automatic Reply") + .setStyle(TextInputStyle.Short) + .setMinLength(0) + .setRequired(true), + ]), + new ActionRowBuilder().addComponents([ + new TextInputBuilder() + .setCustomId("active") + .setValue(mailbox.receiving ? "ON" : "OFF") + .setLabel("Message Receiving") + .setPlaceholder("ON/OFF") + .setRequired(true) + .setMinLength(2) + .setMaxLength(3) + .setStyle(TextInputStyle.Short), + ]), + ]); + + this.interaction.showModal(modal); + } +} diff --git a/src/config/commands.ts b/src/config/commands.ts index 1fa4644c..02d85f7a 100644 --- a/src/config/commands.ts +++ b/src/config/commands.ts @@ -346,6 +346,40 @@ const commands: Command[] = [ permissionLevel: PermissionLevel.none, useType: CommandType.call, }, + { + name: "mailbox", + description: `Manage your store of messages.`, + options: [{ + name: "clear", + description: "Clear all messages from mailbox", + type: ApplicationCommandOptionType.Subcommand, + + permissionLevel: PermissionLevel.serverAdmin, + }, { + name: "messages", + description: "View all of the messages in your mailbox", + type: ApplicationCommandOptionType.Subcommand, + + permissionLevel: PermissionLevel.none, + }, { + name: "remove", + description: "Remove a specific message from your mailbox", + type: ApplicationCommandOptionType.Subcommand, + + permissionLevel: PermissionLevel.serverAdmin, + }, { + name: "settings", + description: "Change settings about your mailbox", + type: ApplicationCommandOptionType.Subcommand, + + permissionLevel: PermissionLevel.serverAdmin, + }], + + guildOnly: true, + numberRequired: true, + permissionLevel: PermissionLevel.none, + useType: CommandType.standard, + }, ]; export default commands; diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index 64540f21..93f3a73b 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -94,7 +94,7 @@ export default async(client: DTelClient, _interaction: Interaction): Promise o.type === ApplicationCommandOptionType.Subcommand) as SubcommandData | null; - - if (subCommand) { - commandName = `${commandName} ${subCommand}`; - permissionLevel = subCommand.permissionLevel; + const subCommand = cmd.options?.filter(o => o.type === ApplicationCommandOptionType.Subcommand) as SubcommandData[]; + if (subCommand.length > 0) { commandName = `${split[0]} ${split[1]}`; - interactionName = split.slice(2, split.length).join("-"); + interactionName = split[2]; + permissionLevel = subCommand.find(c => c.name == split[1])?.permissionLevel || PermissionLevel.none; toRunPath += `/${split[1]}`; } else { permissionLevel = commandData.permissionLevel; diff --git a/src/interactions/mailbox/clear/confirm.ts b/src/interactions/mailbox/clear/confirm.ts new file mode 100644 index 00000000..39bf349c --- /dev/null +++ b/src/interactions/mailbox/clear/confirm.ts @@ -0,0 +1,22 @@ +import ComponentProcessor from "../../../internals/componentProcessor"; + +export default class MailboxClearConfirm extends ComponentProcessor { + async run(): Promise { + await this.db.mailbox.update({ + where: { + number: this.number!.number, + }, + data: { + messages: [], + }, + }); + + this.interaction.reply({ + embeds: [{ + color: this.config.colors.success, + title: "📪 Cleared!", + description: "Your mailbox has been cleared.", + }], + }); + } +} diff --git a/src/interactions/mailbox/send/initiate.ts b/src/interactions/mailbox/send/initiate.ts new file mode 100644 index 00000000..e0e20a72 --- /dev/null +++ b/src/interactions/mailbox/send/initiate.ts @@ -0,0 +1,25 @@ +import { ModalBuilder, TextInputBuilder } from "@discordjs/builders"; +import { ActionRowBuilder, TextInputStyle } from "discord.js"; +import ComponentProcessor from "../../../internals/componentProcessor"; + +export default class MailboxSendInitiate extends ComponentProcessor { + async run(): Promise { + const toSendNum = this.interaction.customId.replace("mailbox-send-initiate-", ""); + + const modal = new ModalBuilder() + .setTitle("Send a message") + .setCustomId(`mailbox-send-modal-${toSendNum}`) + .addComponents([ + new ActionRowBuilder().addComponents([ + new TextInputBuilder() + .setCustomId("message") + .setLabel("Message") + .setPlaceholder("Enter your message here") + .setStyle(TextInputStyle.Short) + .setRequired(true), + ]), + ]); + + this.interaction.showModal(modal); + } +} diff --git a/src/interactions/mailbox/send/modal.ts b/src/interactions/mailbox/send/modal.ts new file mode 100644 index 00000000..6fd0041e --- /dev/null +++ b/src/interactions/mailbox/send/modal.ts @@ -0,0 +1,55 @@ +import ModalProcessor from "../../../internals/modalProcessor"; +import { randomString } from "../../../internals/utils"; + +export default class MailboxSendModalResponse extends ModalProcessor { + async run(): Promise { + const toSendNum = this.interaction.customId.replace("mailbox-send-modal-", ""); + + const toSendMailbox = await this.db.mailbox.findUnique({ + where: { + number: toSendNum, + }, + include: { + numberDoc: true, + }, + }); + + toSendMailbox!.messages.push({ + id: randomString(6), + from: this.number!.number, + message: this.interaction.fields.getTextInputValue("message"), + sent: { + at: new Date(), + by: this.interaction.user.id, + }, + }); + + await this.db.mailbox.update({ + where: { + number: toSendMailbox!.number, + }, + data: { + messages: toSendMailbox!.messages, + }, + }); + + this.interaction.reply("📫 Sent!"); + + this.client.sendCrossShard({ + embeds: [{ + color: this.config.colors.info, + title: "📫 New message!", + description: "You've received a new message!", + fields: [{ + name: "From", + value: this.number!.number, + inline: true, + }, { + name: "Message", + value: this.interaction.fields.getTextInputValue("message"), + inline: true, + }], + }], + }, toSendMailbox!.numberDoc!.channelID); + } +} diff --git a/src/interactions/mailbox/settings/update.ts b/src/interactions/mailbox/settings/update.ts new file mode 100644 index 00000000..4f2658f2 --- /dev/null +++ b/src/interactions/mailbox/settings/update.ts @@ -0,0 +1,53 @@ +import ModalProcessor from "../../../internals/modalProcessor"; + +export default class MailboxSettingsUpdate extends ModalProcessor { + async run(): Promise { + const newAutoreplyMsg = this.interaction.fields.getTextInputValue("autoreply"); + const _active = this.interaction.fields.getTextInputValue("active").toUpperCase(); + + // I hate this + let newReceivingMessages; + switch (_active) { + case "ON": { + newReceivingMessages = true; + break; + } + case "OFF": { + newReceivingMessages = false; + break; + } + default: { + this.interaction.reply({ + embeds: [this.client.errorEmbed("Invalid value for receiving messages. Please enter either `ON` or `OFF`.")], + }); + return; + } + } + + await this.db.mailbox.update({ + where: { + number: this.number!.number, + }, + data: { + autoreply: newAutoreplyMsg, + receiving: newReceivingMessages, + }, + }); + + // TODO: Localize + this.interaction.reply({ + embeds: [{ + color: this.config.colors.info, + title: "📬 Success!", + description: `Mailbox settings for \`${this.number!.number}\` updated!`, + fields: [{ + name: "Answering Machine", + value: newAutoreplyMsg, + }, { + name: "Message Receiving", + value: `\`${_active}\``, + }], + }], + }); + } +} diff --git a/src/interactions/mention/remove/selector.ts b/src/interactions/mention/remove/selector.ts index 28d0db05..53174f23 100644 --- a/src/interactions/mention/remove/selector.ts +++ b/src/interactions/mention/remove/selector.ts @@ -1,4 +1,4 @@ -import { ActionRowBuilder, SelectMenuBuilder, SelectMenuComponent, SelectMenuInteraction } from "discord.js"; +import { ActionRowBuilder, APIEmbed, SelectMenuBuilder, SelectMenuComponent, SelectMenuInteraction } from "discord.js"; import ComponentProcessor from "../../../internals/componentProcessor"; export default class MentionRemoveSelector extends ComponentProcessor { @@ -34,7 +34,7 @@ export default class MentionRemoveSelector extends ComponentProcessor { color: 0x00FF00, ...this.t("removeEmbed", { user: selectedUserTag, - }), + }) as APIEmbed, }], }); } diff --git a/src/internals/callClient.ts b/src/internals/callClient.ts index 5ed9d205..cf7e5f73 100644 --- a/src/internals/callClient.ts +++ b/src/internals/callClient.ts @@ -271,6 +271,8 @@ export default class CallClient implements CallsWithNumbers { let notificationMessageID: string; try { notificationMessageID = (await this.toSend({ + content: this.to.number === config.aliasNumbers["*611"] ? `<@${config.supportGuild.roles.customerSupport}>` : "", + embeds: [{ color: this.client.config.colors.info, @@ -338,21 +340,49 @@ export default class CallClient implements CallsWithNumbers { }, this.to.channelID, callNotifMsgID); } - // TODO: Mailbox + this.toSend({ + embeds: [this.to.t("missedCall.toSide") as APIEmbed], + }); + + const fromEmbed = EmbedBuilder.from(this.from.t("missedCall.fromSide") as APIEmbed); + const toMailbox = await db.mailbox.findFirst({ + where: { + number: this.to.number, + }, + }); + + if (toMailbox) { + const mailboxFull = toMailbox?.messages.length > 25; + + let reply = `${toMailbox.autoreply}`; + if (mailboxFull) reply += " (Mailbox full)"; + + fromEmbed.addFields([{ + name: this.from.t("answeringMachine"), + value: reply, + }]); + } + + const canSendMessage = toMailbox?.receiving && toMailbox?.messages.length < 25; this.fromSend({ - embeds: [this.to.t("missedCall.fromSide") as APIEmbed], - }); - this.toSend({ - embeds: [this.to.t("missedCall.toSide") as APIEmbed], + embeds: [fromEmbed], + components: canSendMessage ? [new ActionRowBuilder().addComponents([ + new ButtonBuilder() + .setCustomId(`mailbox-send-initiate-${this.toNum}`) + .setEmoji("📬") + .setLabel(this.from.t("sendMessage")) + .setStyle(ButtonStyle.Primary), + ])] : undefined, }); } catch { // Ignore } - this.endHandler(); - }, 2 * 60 * 1000); + this.endHandler("missed"); + // }, 2 * 60 * 1000); + }, 0.001 * 60 * 1000); } async pickup(interaction: MessageComponentInteraction): Promise { @@ -469,12 +499,13 @@ export default class CallClient implements CallsWithNumbers { }, }); } else { - toSend.embeds?.push(this.client.warningEmbed("", { + toSend.embeds?.push({ + color: config.colors.yellowbook, description: `File: **[${i.name}](${i.url})**`, footer: { text: sideToSendTo.t("dontTrustStrangers"), }, - })); + }); } } } @@ -661,7 +692,7 @@ export default class CallClient implements CallsWithNumbers { thisSideEmbed.setDescription("You have put the call on hold. Use `/hold` to resume the call."); otherSideEmbed.setDescription("The other side have put you on hold. Please wait..."); // Unhold call - } else { + } else { console.log(this.hold.holdingSide); console.log(interaction.channelId); if (this.hold.holdingSide != interaction.channelId) { @@ -703,7 +734,7 @@ export default class CallClient implements CallsWithNumbers { this.repropagate(newObject); } - async endHandler(endedBy = ""): Promise { + async endHandler(endedBy = "system - number lost"): Promise { CallClient.endInDB(this.id, endedBy); this.client.calls.delete(this.id); @@ -712,7 +743,7 @@ export default class CallClient implements CallsWithNumbers { this.client.shard!.send({ msg: "callEnded", callID: this.id, - endedBy: "system - number lost", + endedBy: endedBy, }); } } diff --git a/src/internals/client.ts b/src/internals/client.ts index 4721e283..0332f500 100644 --- a/src/internals/client.ts +++ b/src/internals/client.ts @@ -45,6 +45,7 @@ class DTelClient extends Client { warningEmbed(description: string, options?: APIEmbed): APIEmbed { return { color: 0xFFFF00, + title: "⚠️ Warning!", description, ...options, }; diff --git a/src/internals/processor.ts b/src/internals/processor.ts index 38a5b5ec..196cd9f9 100644 --- a/src/internals/processor.ts +++ b/src/internals/processor.ts @@ -3,7 +3,7 @@ import { CommandInteraction, InteractionResponse, MessageComponentInteraction, M import DTelClient from "./client"; import config from "../config/config"; import CommandDataInterface, { CommandType } from "../interfaces/commandData"; -import { Numbers, Accounts } from "@prisma/client"; +import { Numbers, Accounts, Mailbox } from "@prisma/client"; import { db } from "../database/db"; import CallClient from "./callClient"; import { fetchNumber, formatShardNumber, getAccount } from "./utils"; @@ -69,6 +69,18 @@ abstract class Processor { return account!; } + async fetchMailbox(number: string = this.number!.number): Promise { + return this.db.mailbox.upsert({ + create: { + number, + }, + where: { + number, + }, + update: {}, + }); + } + async _run(): Promise { if (this.commandData.useType === CommandType.call) { this.call = this.client.calls.find(c => c.from.channelID === this.interaction.channelId || c.to.channelID === this.interaction.channelId); diff --git a/src/internationalization/data/english.ts b/src/internationalization/data/english.ts index 1cf86b53..ba28f503 100644 --- a/src/internationalization/data/english.ts +++ b/src/internationalization/data/english.ts @@ -55,6 +55,9 @@ export default { call: { pickup: "Pick up", hangup: "Hang up", + mailbox: "Mailbox", + answeringMachine: "📠 Answering Machine", + sendMessage: "Send Message", dontTrustStrangers: "Don't trust files from strangers", errors: { @@ -85,7 +88,7 @@ export default { }, incomingCall: { - title: "Incoming call", + title: "📞 Incoming call", description: "There is an incoming call from `{{ number }}`. Pick up, hang up or wait it out.", footer: { text: "ID: {{ callID }}", diff --git a/target/npmlist.json b/target/npmlist.json index 3abcba2e..16d0cba7 100644 --- a/target/npmlist.json +++ b/target/npmlist.json @@ -1 +1 @@ -{"version":"4.0.0","name":"dtel","dependencies":{"@discoin/scambio":{"version":"2.2.0"},"bufferutil":{"version":"4.0.6"},"discord.js":{"version":"13.6.0"},"erlpack":{"version":"0.1.3"},"mongoose":{"version":"6.2.2"},"node-schedule":{"version":"2.1.0"},"re2":{"version":"1.17.3"},"url-regex-safe":{"version":"3.0.0"},"utf-8-validate":{"version":"5.0.8"},"uuid":{"version":"8.3.2"},"winston-daily-rotate-file":{"version":"4.6.1"},"winston":{"version":"3.6.0"},"zlib-sync":{"version":"0.1.7"},"zucc":{"version":"0.1.2"}}} \ No newline at end of file +{"version":"4.0.0","name":"dtel","dependencies":{"@discoin/scambio":{"version":"2.2.0"},"@prisma/client":{"version":"4.5.0"},"bufferutil":{"version":"4.0.7"},"dayjs":{"version":"1.11.6"},"discord-api-types":{"version":"0.37.15"},"discord.js":{"version":"14.6.0"},"erlpack":{"version":"0.1.3"},"i18next":{"version":"21.10.0"},"node-schedule":{"version":"2.1.0"},"re2":{"version":"1.17.7"},"url-regex-safe":{"version":"3.0.0"},"utf-8-validate":{"version":"5.0.10"},"uuid":{"version":"9.0.0"},"winston-daily-rotate-file":{"version":"4.7.1"},"winston":{"version":"3.8.2"},"zlib-sync":{"version":"0.1.7"},"zucc":{"version":"0.1.2"}}} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 4308db9b..a1d1c2b0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,9 +7,11 @@ "module": "CommonJS", "moduleResolution": "Node", "esModuleInterop": true, + "skipLibCheck": true }, "include": [ - "src/**/*.ts" + "src/**/*.ts", + "types/**/*.d.ts" ] } \ No newline at end of file