From 84d945cc21e8d8d915c83dd73360a49a659ba035 Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 29 Sep 2021 18:39:47 +0200 Subject: [PATCH] Add TS support --- package-lock.json | 137 +++++++++++++++++++++++--------- package.json | 7 +- src/structures/BaseStructure.ts | 7 +- typings/index.d.ts | 18 ++--- 4 files changed, 116 insertions(+), 53 deletions(-) diff --git a/package-lock.json b/package-lock.json index ae07f169..a2cff8f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,21 @@ { "name": "sheweny", - "version": "2.0.0", + "version": "2.0.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sheweny", - "version": "2.0.0", + "version": "2.0.8", "license": "MIT", "dependencies": { - "@sheweny/resolve": "^1.3.1", + "@sheweny/resolve": "^1.3.2", "collection-data": "^1.0.1", - "discord.js": "^13.1.0" + "sheweny": "^2.0.7" }, "devDependencies": { "@types/node": "^16.6.1", + "discord.js": "^13.1.0", "ts-node-dev": "^1.1.8" } }, @@ -22,6 +23,7 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.5.0.tgz", "integrity": "sha512-HP5y4Rqw68o61Qv4qM5tVmDbWi4mdTFftqIOGRo33SNPpLJ1Ga3KEIR2ibKofkmsoQhEpLmopD1AZDs3cKpHuw==", + "dev": true, "dependencies": { "@sindresorhus/is": "^4.0.1", "discord-api-types": "^0.22.0", @@ -38,6 +40,7 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.2.1.tgz", "integrity": "sha512-vhxqzzM8gkomw0TYRF3tgx7SwElzUlXT/Aa41O7mOcyN6wIJfj5JmDWaO5XGKsGSsNx7F3i5oIlrucCCWV1Nog==", + "dev": true, "engines": { "node": ">=14.0.0" } @@ -46,6 +49,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", + "dev": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -59,23 +63,22 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.4.tgz", "integrity": "sha512-fFrlF/uWpGOX5djw5Mu2Hnnrunao75WGey0sP0J3jnhmrJ5TAPzHYOmytD5iN/+pMxS+f+u/gezqHa9tPhRHEA==", + "dev": true, "engines": { "node": ">=14", "npm": ">=6" } }, "node_modules/@sheweny/resolve": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@sheweny/resolve/-/resolve-1.3.1.tgz", - "integrity": "sha512-fxACOtSN4trVPqIwHUrfBVR1yLja9EGndItoTDxFvReqabQIO2BR+0+qycHEnH0OPTGmXnMdY0hPB9MMdxDfrg==", - "dependencies": { - "discord.js": "^13.0.1" - } + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@sheweny/resolve/-/resolve-1.3.2.tgz", + "integrity": "sha512-U7LHZpI16C7q2xPyiGS750mLYZxrGejf5GBjKUXHI3NGKx1ks2EsVJ8lKrqYCcaU7aDkXTMiqbNwhqWpDlh1gw==" }, "node_modules/@sindresorhus/is": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==", + "dev": true, "engines": { "node": ">=10" }, @@ -86,7 +89,8 @@ "node_modules/@types/node": { "version": "16.7.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.10.tgz", - "integrity": "sha512-S63Dlv4zIPb8x6MMTgDq5WWRJQe56iBEY0O3SOFA9JrRienkOVDXSXBjjJw6HTNQYSE2JI6GMCR6LVbIMHJVvA==" + "integrity": "sha512-S63Dlv4zIPb8x6MMTgDq5WWRJQe56iBEY0O3SOFA9JrRienkOVDXSXBjjJw6HTNQYSE2JI6GMCR6LVbIMHJVvA==", + "dev": true }, "node_modules/@types/strip-bom": { "version": "3.0.0", @@ -104,6 +108,7 @@ "version": "7.4.7", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dev": true, "dependencies": { "@types/node": "*" } @@ -130,7 +135,8 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, "node_modules/balanced-match": { "version": "1.0.2", @@ -179,6 +185,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, "engines": { "node": ">=6" } @@ -213,6 +220,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -236,6 +244,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, "engines": { "node": ">=0.4.0" } @@ -253,6 +262,7 @@ "version": "0.22.0", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz", "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==", + "dev": true, "engines": { "node": ">=12" } @@ -261,6 +271,7 @@ "version": "13.1.0", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.1.0.tgz", "integrity": "sha512-gxO4CXKdHpqA+WKG+f5RNnd3srTDj5uFJHgOathksDE90YNq/Qijkd2WlMgTTMS6AJoEnHxI7G9eDQHCuZ+xDA==", + "dev": true, "dependencies": { "@discordjs/builders": "^0.5.0", "@discordjs/collection": "^0.2.1", @@ -280,6 +291,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", + "dev": true, "dependencies": { "is-obj": "^2.0.0" }, @@ -455,6 +467,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true, "engines": { "node": ">=8" } @@ -462,7 +475,8 @@ "node_modules/lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true }, "node_modules/make-error": { "version": "1.3.6", @@ -474,6 +488,7 @@ "version": "1.49.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", + "dev": true, "engines": { "node": ">= 0.6" } @@ -482,6 +497,7 @@ "version": "2.1.32", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "dev": true, "dependencies": { "mime-db": "1.49.0" }, @@ -523,6 +539,7 @@ "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true, "engines": { "node": "4.x || >=6.0.0" } @@ -549,6 +566,7 @@ "version": "0.27.0", "resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz", "integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==", + "dev": true, "dependencies": { "@sindresorhus/is": "^4.0.1", "callsites": "^3.1.0", @@ -628,6 +646,15 @@ "rimraf": "bin.js" } }, + "node_modules/sheweny": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/sheweny/-/sheweny-2.0.7.tgz", + "integrity": "sha512-yNZPDK4H8a5o2WTJmUcdtnI+nf0SH/+uCEsWVDYGfDlAObL0lZZSTKvXkEjTNk3EdJbgYtPuAcrJ3tBkQbzHBw==", + "dependencies": { + "@sheweny/resolve": "^1.3.2", + "collection-data": "^1.0.1" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -689,7 +716,8 @@ "node_modules/ts-mixer": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz", - "integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ==" + "integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ==", + "dev": true }, "node_modules/ts-node": { "version": "9.1.1", @@ -766,12 +794,14 @@ "node_modules/tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true }, "node_modules/type-fest": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "dev": true, "engines": { "node": ">=10" }, @@ -797,6 +827,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -811,6 +842,7 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.4.tgz", "integrity": "sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg==", + "dev": true, "engines": { "node": ">=8.3.0" }, @@ -851,6 +883,7 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.5.0.tgz", "integrity": "sha512-HP5y4Rqw68o61Qv4qM5tVmDbWi4mdTFftqIOGRo33SNPpLJ1Ga3KEIR2ibKofkmsoQhEpLmopD1AZDs3cKpHuw==", + "dev": true, "requires": { "@sindresorhus/is": "^4.0.1", "discord-api-types": "^0.22.0", @@ -862,12 +895,14 @@ "@discordjs/collection": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.2.1.tgz", - "integrity": "sha512-vhxqzzM8gkomw0TYRF3tgx7SwElzUlXT/Aa41O7mOcyN6wIJfj5JmDWaO5XGKsGSsNx7F3i5oIlrucCCWV1Nog==" + "integrity": "sha512-vhxqzzM8gkomw0TYRF3tgx7SwElzUlXT/Aa41O7mOcyN6wIJfj5JmDWaO5XGKsGSsNx7F3i5oIlrucCCWV1Nog==", + "dev": true }, "@discordjs/form-data": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", + "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -877,25 +912,25 @@ "@sapphire/async-queue": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.4.tgz", - "integrity": "sha512-fFrlF/uWpGOX5djw5Mu2Hnnrunao75WGey0sP0J3jnhmrJ5TAPzHYOmytD5iN/+pMxS+f+u/gezqHa9tPhRHEA==" + "integrity": "sha512-fFrlF/uWpGOX5djw5Mu2Hnnrunao75WGey0sP0J3jnhmrJ5TAPzHYOmytD5iN/+pMxS+f+u/gezqHa9tPhRHEA==", + "dev": true }, "@sheweny/resolve": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@sheweny/resolve/-/resolve-1.3.1.tgz", - "integrity": "sha512-fxACOtSN4trVPqIwHUrfBVR1yLja9EGndItoTDxFvReqabQIO2BR+0+qycHEnH0OPTGmXnMdY0hPB9MMdxDfrg==", - "requires": { - "discord.js": "^13.0.1" - } + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@sheweny/resolve/-/resolve-1.3.2.tgz", + "integrity": "sha512-U7LHZpI16C7q2xPyiGS750mLYZxrGejf5GBjKUXHI3NGKx1ks2EsVJ8lKrqYCcaU7aDkXTMiqbNwhqWpDlh1gw==" }, "@sindresorhus/is": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", - "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==" + "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==", + "dev": true }, "@types/node": { "version": "16.7.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.10.tgz", - "integrity": "sha512-S63Dlv4zIPb8x6MMTgDq5WWRJQe56iBEY0O3SOFA9JrRienkOVDXSXBjjJw6HTNQYSE2JI6GMCR6LVbIMHJVvA==" + "integrity": "sha512-S63Dlv4zIPb8x6MMTgDq5WWRJQe56iBEY0O3SOFA9JrRienkOVDXSXBjjJw6HTNQYSE2JI6GMCR6LVbIMHJVvA==", + "dev": true }, "@types/strip-bom": { "version": "3.0.0", @@ -913,6 +948,7 @@ "version": "7.4.7", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dev": true, "requires": { "@types/node": "*" } @@ -936,7 +972,8 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, "balanced-match": { "version": "1.0.2", @@ -978,7 +1015,8 @@ "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true }, "chokidar": { "version": "3.5.2", @@ -1005,6 +1043,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -1024,7 +1063,8 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true }, "diff": { "version": "4.0.2", @@ -1035,12 +1075,14 @@ "discord-api-types": { "version": "0.22.0", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz", - "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==" + "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==", + "dev": true }, "discord.js": { "version": "13.1.0", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.1.0.tgz", "integrity": "sha512-gxO4CXKdHpqA+WKG+f5RNnd3srTDj5uFJHgOathksDE90YNq/Qijkd2WlMgTTMS6AJoEnHxI7G9eDQHCuZ+xDA==", + "dev": true, "requires": { "@discordjs/builders": "^0.5.0", "@discordjs/collection": "^0.2.1", @@ -1056,6 +1098,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", + "dev": true, "requires": { "is-obj": "^2.0.0" } @@ -1187,12 +1230,14 @@ "is-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true }, "lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true }, "make-error": { "version": "1.3.6", @@ -1203,12 +1248,14 @@ "mime-db": { "version": "1.49.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", + "dev": true }, "mime-types": { "version": "2.1.32", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "dev": true, "requires": { "mime-db": "1.49.0" } @@ -1237,7 +1284,8 @@ "node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true }, "normalize-path": { "version": "3.0.0", @@ -1258,6 +1306,7 @@ "version": "0.27.0", "resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz", "integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==", + "dev": true, "requires": { "@sindresorhus/is": "^4.0.1", "callsites": "^3.1.0", @@ -1313,6 +1362,15 @@ "glob": "^7.1.3" } }, + "sheweny": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/sheweny/-/sheweny-2.0.7.tgz", + "integrity": "sha512-yNZPDK4H8a5o2WTJmUcdtnI+nf0SH/+uCEsWVDYGfDlAObL0lZZSTKvXkEjTNk3EdJbgYtPuAcrJ3tBkQbzHBw==", + "requires": { + "@sheweny/resolve": "^1.3.2", + "collection-data": "^1.0.1" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -1359,7 +1417,8 @@ "ts-mixer": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz", - "integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ==" + "integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ==", + "dev": true }, "ts-node": { "version": "9.1.1", @@ -1408,12 +1467,14 @@ "tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true }, "type-fest": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==" + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "dev": true }, "typescript": { "version": "4.4.2", @@ -1425,7 +1486,8 @@ "vali-date": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", - "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=" + "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", + "dev": true }, "wrappy": { "version": "1.0.2", @@ -1437,6 +1499,7 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.4.tgz", "integrity": "sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg==", + "dev": true, "requires": {} }, "xtend": { diff --git a/package.json b/package.json index 1808f957..14266265 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sheweny", - "version": "2.0.5", + "version": "2.1.0", "description": "The powerful framework for create discord bots", "main": "build/index.js", "types": "./typings/index.d.ts", @@ -25,11 +25,12 @@ "homepage": "https://sheweny.js.org", "dependencies": { "@sheweny/resolve": "^1.3.2", - "collection-data": "^1.0.1" + "collection-data": "^1.0.1", + "sheweny": "^2.0.7" }, "devDependencies": { - "discord.js": "^13.1.0", "@types/node": "^16.6.1", + "discord.js": "^13.1.0", "ts-node-dev": "^1.1.8" } } diff --git a/src/structures/BaseStructure.ts b/src/structures/BaseStructure.ts index cfd8c052..4ca6f7a7 100644 --- a/src/structures/BaseStructure.ts +++ b/src/structures/BaseStructure.ts @@ -1,10 +1,9 @@ import type { ShewenyClient } from "../"; - /** * The base class for all structures */ export abstract class BaseStructure { - public client: ShewenyClient | any; + public client: ShewenyClient; public path?: string; /** @@ -12,8 +11,8 @@ export abstract class BaseStructure { * @param {ShewenyClient} client Client framework * @param {string} [path] Path for the structure */ - constructor(client: ShewenyClient, path?: string) { - this.client = client; + constructor(client: ShewenyClient | any, path?: string) { + this.client = client as ShewenyClient; this.path = path; } } diff --git a/typings/index.d.ts b/typings/index.d.ts index 3de04aef..ca380821 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -23,15 +23,15 @@ import type { DiscordResolve } from "@sheweny/resolve"; //#region Classes -export abstract class BaseStructure { - public constructor(client: ShewenyClient, path?: string); +export abstract class BaseStructure { + public constructor(client: T, path?: string); - public client: ShewenyClient | any; + public client: T; public path?: string; } -export abstract class Button extends BaseStructure { - public constructor(client: ShewenyClient, customId: string[]); +export abstract class Button extends BaseStructure { + public constructor(client: T, customId: string[]); public customId: string[]; @@ -53,7 +53,7 @@ export class ButtonsManager { public loadAll(): Promise | undefined>; } -export abstract class Command extends BaseStructure { +export abstract class Command extends BaseStructure { public constructor(client: ShewenyClient, data: CommandData); public name: string; @@ -194,7 +194,7 @@ export class CommandsManager extends EventEmitter { ): this; } -export abstract class Event extends BaseStructure { +export abstract class Event extends BaseStructure { public constructor( client: ShewenyClient, name: keyof ClientEvents, @@ -225,7 +225,7 @@ export class EventsManager { public loadAndRegisterAll(): Promise; } -export abstract class Inhibitor extends BaseStructure { +export abstract class Inhibitor extends BaseStructure { public constructor(client: ShewenyClient, name: string, options?: InhibitorOptions); public name: string; @@ -250,7 +250,7 @@ export class InhibitorsManager { public loadAll(): Promise | undefined>; } -export abstract class SelectMenu extends BaseStructure { +export abstract class SelectMenu extends BaseStructure { public constructor(client: ShewenyClient, customId: string[]); public customId: string[];