[Fixes] Fixed all issues
This commit is contained in:
parent
6a71b42e66
commit
7b70fcd297
|
@ -2,5 +2,6 @@ node_modules
|
|||
.cache
|
||||
clones
|
||||
src/env.js
|
||||
dist/*
|
||||
devDist
|
||||
devTemp
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
"dependencies": {
|
||||
"axios": "^0.21.1",
|
||||
"glob": "^7.1.6",
|
||||
"parcel-bundler": "^1.12.4"
|
||||
"parcel-bundler": "^1.12.4",
|
||||
"sass": "^1.32.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
|
@ -1785,9 +1786,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001179",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001179.tgz",
|
||||
"integrity": "sha512-blMmO0QQujuUWZKyVrD1msR4WNDAqb/UPO1Sw2WWsQ7deoM5bJiicKnWJ1Y0NS/aGINSnKPIWBMw5luX+NDUCA=="
|
||||
"version": "1.0.30001242",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001242.tgz",
|
||||
"integrity": "sha512-KvNuZ/duufelMB3w2xtf9gEWCSxJwUgoxOx5b6ScLXC4kPc9xsczUVCPrQU26j5kOsHM4pSUL54tAZt5THQKug==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/browserslist"
|
||||
}
|
||||
},
|
||||
"node_modules/caseless": {
|
||||
"version": "0.12.0",
|
||||
|
@ -4974,6 +4979,17 @@
|
|||
"resolved": "https://registry.npmjs.org/physical-cpu-count/-/physical-cpu-count-2.0.0.tgz",
|
||||
"integrity": "sha1-GN4vl+S/epVRrXURlCtUlverpmA="
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
|
||||
"integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/pn": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
|
||||
|
@ -5978,6 +5994,147 @@
|
|||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.35.1",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.35.1.tgz",
|
||||
"integrity": "sha512-oCisuQJstxMcacOPmxLNiLlj4cUyN2+8xJnG7VanRoh2GOLr9RqkvI4AxA4a6LHVg/rsu+PmxXeGhrdSF9jCiQ==",
|
||||
"dependencies": {
|
||||
"chokidar": ">=3.0.0 <4.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"sass": "sass.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/anymatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
|
||||
"integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
|
||||
"dependencies": {
|
||||
"normalize-path": "^3.0.0",
|
||||
"picomatch": "^2.0.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"dependencies": {
|
||||
"fill-range": "^7.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/chokidar": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
|
||||
"integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
|
||||
"dependencies": {
|
||||
"anymatch": "~3.1.2",
|
||||
"braces": "~3.0.2",
|
||||
"glob-parent": "~5.1.2",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.10.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/fsevents": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
||||
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/glob-parent": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||
"dependencies": {
|
||||
"is-glob": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/is-binary-path": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"dependencies": {
|
||||
"binary-extensions": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/is-number": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||
"engines": {
|
||||
"node": ">=0.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
||||
"dependencies": {
|
||||
"picomatch": "^2.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"dependencies": {
|
||||
"is-number": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
|
@ -8829,9 +8986,9 @@
|
|||
}
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001179",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001179.tgz",
|
||||
"integrity": "sha512-blMmO0QQujuUWZKyVrD1msR4WNDAqb/UPO1Sw2WWsQ7deoM5bJiicKnWJ1Y0NS/aGINSnKPIWBMw5luX+NDUCA=="
|
||||
"version": "1.0.30001242",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001242.tgz",
|
||||
"integrity": "sha512-KvNuZ/duufelMB3w2xtf9gEWCSxJwUgoxOx5b6ScLXC4kPc9xsczUVCPrQU26j5kOsHM4pSUL54tAZt5THQKug=="
|
||||
},
|
||||
"caseless": {
|
||||
"version": "0.12.0",
|
||||
|
@ -11454,6 +11611,11 @@
|
|||
"resolved": "https://registry.npmjs.org/physical-cpu-count/-/physical-cpu-count-2.0.0.tgz",
|
||||
"integrity": "sha1-GN4vl+S/epVRrXURlCtUlverpmA="
|
||||
},
|
||||
"picomatch": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
|
||||
"integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw=="
|
||||
},
|
||||
"pn": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
|
||||
|
@ -12279,11 +12441,101 @@
|
|||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"sass": {
|
||||
"version": "1.32.8",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.32.8.tgz",
|
||||
"integrity": "sha512-Sl6mIeGpzjIUZqvKnKETfMf0iDAswD9TNlv13A7aAF3XZlRPMq4VvJWBC2N2DXbp94MQVdNSFG6LfF/iOXrPHQ==",
|
||||
"version": "1.35.1",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.35.1.tgz",
|
||||
"integrity": "sha512-oCisuQJstxMcacOPmxLNiLlj4cUyN2+8xJnG7VanRoh2GOLr9RqkvI4AxA4a6LHVg/rsu+PmxXeGhrdSF9jCiQ==",
|
||||
"requires": {
|
||||
"chokidar": ">=2.0.0 <4.0.0"
|
||||
"chokidar": ">=3.0.0 <4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"anymatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
|
||||
"integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
|
||||
"requires": {
|
||||
"normalize-path": "^3.0.0",
|
||||
"picomatch": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
|
||||
},
|
||||
"braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"requires": {
|
||||
"fill-range": "^7.0.1"
|
||||
}
|
||||
},
|
||||
"chokidar": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
|
||||
"integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
|
||||
"requires": {
|
||||
"anymatch": "~3.1.2",
|
||||
"braces": "~3.0.2",
|
||||
"fsevents": "~2.3.2",
|
||||
"glob-parent": "~5.1.2",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.6.0"
|
||||
}
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"requires": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
||||
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
||||
"optional": true
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||
"requires": {
|
||||
"is-glob": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"is-binary-path": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"requires": {
|
||||
"binary-extensions": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"is-number": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
|
||||
},
|
||||
"readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
||||
"requires": {
|
||||
"picomatch": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"requires": {
|
||||
"is-number": "^7.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"sax": {
|
||||
|
|
11
package.json
11
package.json
|
@ -2,34 +2,27 @@
|
|||
"name": "ms2builder",
|
||||
"version": "1.0.0",
|
||||
"description": "Builder for Module Store v2.",
|
||||
|
||||
"main": "src/index.js",
|
||||
|
||||
"scripts": {
|
||||
"theme": "node ./scripts/add.js theme",
|
||||
"pccompatcheck": "node ./scripts/pccompatCheck.js"
|
||||
},
|
||||
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/GooseMod/MS2Builder.git"
|
||||
},
|
||||
|
||||
"author": "GooseMod",
|
||||
"license": "MIT",
|
||||
|
||||
"bugs": {
|
||||
"url": "https://github.com/GooseMod/MS2Builder/issues"
|
||||
},
|
||||
"homepage": "https://github.com/GooseMod/MS2Builder#readme",
|
||||
|
||||
"dependencies": {
|
||||
"axios": "^0.21.1",
|
||||
"glob": "^7.1.6",
|
||||
"parcel-bundler": "^1.12.4",
|
||||
"sass": "^1.32.8"
|
||||
},
|
||||
|
||||
"alias": {
|
||||
"@goosemod/patcher": "./moduleWrappers/goosemod/patcher.js",
|
||||
"@goosemod/webpack": "./moduleWrappers/goosemod/webpack.js",
|
||||
|
@ -39,17 +32,13 @@
|
|||
"@goosemod/toast": "./moduleWrappers/goosemod/toast.js",
|
||||
"@goosemod/settings": "./moduleWrappers/goosemod/settings.js",
|
||||
"@goosemod/plugin": "./moduleWrappers/goosemod/plugin.js",
|
||||
|
||||
"powercord/entities": "./moduleWrappers/powercord/entities.js",
|
||||
"powercord/injector": "./moduleWrappers/powercord/injector.js",
|
||||
"powercord/webpack": "./moduleWrappers/powercord/webpack.js",
|
||||
"powercord/util": "./moduleWrappers/powercord/util.js",
|
||||
"powercord/components/settings": "./moduleWrappers/powercord/components/settings/index.js",
|
||||
|
||||
"_powercord/global": "./moduleWrappers/powercord/global/index.js",
|
||||
|
||||
"electron": "./moduleWrappers/electron/index.js"
|
||||
},
|
||||
|
||||
"type": "module"
|
||||
}
|
||||
|
|
|
@ -1,36 +1,49 @@
|
|||
import Env from './env.js';
|
||||
|
||||
import { readFileSync } from 'fs';
|
||||
import axios from 'axios';
|
||||
|
||||
let lastRequest = 0;
|
||||
const userCache = {};
|
||||
|
||||
let file;
|
||||
let botToken;
|
||||
try {
|
||||
file = JSON.parse(readFileSync('./env.json'));
|
||||
botToken = file.dtoken;
|
||||
} catch (error) {
|
||||
if (error.code !== 'ENOENT') throw error;
|
||||
botToken = process.env.BOTTOKEN;
|
||||
}
|
||||
|
||||
const getUser = async (id) => {
|
||||
if (userCache[id]) return userCache[id];
|
||||
|
||||
while (performance.now() - 500 < lastRequest) { // Has been less than 500ms since last request
|
||||
while (performance.now() - 500 < lastRequest) {
|
||||
// Has been less than 500ms since last request
|
||||
await new Promise((res) => setTimeout(res, 100));
|
||||
}
|
||||
|
||||
lastRequest = performance.now();
|
||||
|
||||
return userCache[id] = (await axios.get(`https://discord.com/api/v9/users/${id}`, {
|
||||
return (userCache[id] = (
|
||||
await axios.get(`https://discord.com/api/v9/users/${id}`, {
|
||||
headers: {
|
||||
'Authorization': `Bot ${Env.discord}`
|
||||
}
|
||||
})).data;
|
||||
}
|
||||
Authorization: `Bot ${botToken}`,
|
||||
},
|
||||
})
|
||||
).data);
|
||||
};
|
||||
|
||||
export default async (id) => {
|
||||
const user = await getUser(id);
|
||||
|
||||
console.log(user);
|
||||
|
||||
return { // Use semi-minified keys as to avoid size
|
||||
return {
|
||||
// Use semi-minified keys as to avoid size
|
||||
i: id, // id
|
||||
|
||||
n: user.username, // name
|
||||
|
||||
a: user.avatar // avatar
|
||||
}
|
||||
a: user.avatar, // avatar
|
||||
};
|
||||
};
|
13
src/index.js
13
src/index.js
|
@ -16,8 +16,15 @@ import { createHash } from 'crypto';
|
|||
import { dirname, sep } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
import Env from './env.js';
|
||||
const githubPAT = process.env.GHTOKEN;
|
||||
let file;
|
||||
let githubPAT;
|
||||
try {
|
||||
file = JSON.parse(readFileSync('./env.json'));
|
||||
githubPAT = file.token;
|
||||
} catch (error) {
|
||||
if (error.code !== 'ENOENT') throw error;
|
||||
githubPAT = process.env.GHTOKEN;
|
||||
}
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
|
@ -79,7 +86,7 @@ const getGithubInfo = async (repo) => {
|
|||
const info = (
|
||||
await axios.get(`https://api.github.com/repos/${repo}`, {
|
||||
headers: {
|
||||
Authorization: `token ${process.env.githubPAT ? process.env.githubPAT : Env.github}`,
|
||||
Authorization: `token ${githubPAT}`,
|
||||
},
|
||||
})
|
||||
).data;
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
export default [
|
||||
['RazerMoon/muteNewGuild', 'a8ea528e67089ea00a457623cebbef6a670127fc', '/manifest.json', 'pcPlugin', {
|
||||
authors: ['162970149857656832'],
|
||||
}],
|
||||
['keanuplayz/PC-Clap', 'master', '/manifest.json', 'pcPlugin', {
|
||||
[
|
||||
'keanuplayz/PC-Clap',
|
||||
'master',
|
||||
'/manifest.json',
|
||||
'pcPlugin',
|
||||
{
|
||||
authors: ['717352467280691331'],
|
||||
}],
|
||||
},
|
||||
],
|
||||
];
|
||||
|
|
|
@ -4,273 +4,22 @@ export default [
|
|||
- No hash is provided as ported themes have no risk of RCE / etc
|
||||
*/
|
||||
|
||||
['keanuplayz/usrbg', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['717352467280691331']
|
||||
}],
|
||||
<<<<<<< HEAD
|
||||
['lexisother/dotfiles-discord-theme', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['465702500146610176', '364720702252908544']
|
||||
}]
|
||||
[
|
||||
'keanuplayz/usrbg',
|
||||
'',
|
||||
'/powercord_manifest.json',
|
||||
'pcTheme',
|
||||
{
|
||||
authors: ['717352467280691331'],
|
||||
},
|
||||
],
|
||||
[
|
||||
'lexisother/dotfiles-discord-theme',
|
||||
'',
|
||||
'/powercord_manifest.json',
|
||||
'pcTheme',
|
||||
{
|
||||
authors: ['465702500146610176', '364720702252908544'],
|
||||
},
|
||||
],
|
||||
];
|
||||
=======
|
||||
|
||||
['j0lol/i-fixed-discord', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['363437829507776513']
|
||||
}],
|
||||
|
||||
['Discord-Theme-Addons/bottom-bar', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['399416615742996480'],
|
||||
images: ['https://raw.githubusercontent.com/Discord-Theme-Addons/bottom-bar/default/screenshots/preview.png']
|
||||
}],
|
||||
|
||||
['Discord-Theme-Addons/gradientbuttons-v2', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['399416615742996480'],
|
||||
images: [
|
||||
'https://raw.githubusercontent.com/Discord-Theme-Addons/gradientbuttons-v2/main/screenshots/message-menu.gif',
|
||||
'https://raw.githubusercontent.com/Discord-Theme-Addons/gradientbuttons-v2/main/screenshots/server-menu.gif',
|
||||
'https://raw.githubusercontent.com/Discord-Theme-Addons/gradientbuttons-v2/main/screenshots/statuspicker-menu.gif'
|
||||
]
|
||||
}],
|
||||
|
||||
['Discord-Theme-Addons/modern-channel-indicators', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['399416615742996480'],
|
||||
images: ['https://raw.githubusercontent.com/Discord-Theme-Addons/modern-channel-indicators/main/screenshots/preview.png']
|
||||
}],
|
||||
|
||||
['doggybootsy/NsfwSfwTags', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['515780151791976453'],
|
||||
images: ['https://i.imgur.com/SCObryS.png']
|
||||
}],
|
||||
|
||||
['doggybootsy/bubblecord', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['515780151791976453'],
|
||||
images: [
|
||||
'https://raw.githubusercontent.com/doggybootsy/bubblecord/main/screenshots/1.png',
|
||||
'https://raw.githubusercontent.com/doggybootsy/bubblecord/main/screenshots/2.png',
|
||||
'https://raw.githubusercontent.com/doggybootsy/bubblecord/main/screenshots/3.png',
|
||||
'https://raw.githubusercontent.com/doggybootsy/bubblecord/main/screenshots/4.png',
|
||||
'https://raw.githubusercontent.com/doggybootsy/bubblecord/main/screenshots/5.png',
|
||||
'https://raw.githubusercontent.com/doggybootsy/bubblecord/main/screenshots/6.png',
|
||||
'https://raw.githubusercontent.com/doggybootsy/bubblecord/main/screenshots/7.png'
|
||||
]
|
||||
}],
|
||||
|
||||
['doggybootsy/Mobile_Messages', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['515780151791976453'],
|
||||
images: ['https://i.imgur.com/VBE49wL.png']
|
||||
}],
|
||||
|
||||
['Fahrenheit/Semi-Stock-Discord', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['239824092239233024'],
|
||||
images: ['https://raw.githubusercontent.com/Fahrenheit/Semi-Stock-Discord/main/Windows%20Preview.png']
|
||||
}],
|
||||
|
||||
['Freeplayg/Discord-TeardropMessages', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['158296466119458816'],
|
||||
images: ['https://media.discordapp.net/attachments/755005710323941386/811325025025785886/2021-02-16_14-51.png']
|
||||
}],
|
||||
|
||||
['BrendanWalter/Nebula4', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['597072695875600385'],
|
||||
images: ['https://i.imgur.com/vcoREaX.png']
|
||||
}],
|
||||
|
||||
['cainy-a/LunaCord', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['435026627907420161']
|
||||
}],
|
||||
|
||||
['yellowsink/SmolCord', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['435026627907420161']
|
||||
}],
|
||||
|
||||
['yellowsink/Diskai', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['435026627907420161'],
|
||||
images: ['https://raw.githubusercontent.com/cainy-a/Diskai/master/screenshots/User%20Settings.png', 'https://raw.githubusercontent.com/cainy-a/Diskai/master/screenshots/Voice%20Settings.png']
|
||||
}],
|
||||
|
||||
['Awish-Senpai/ForgottenKeep', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['671355502399193128'],
|
||||
images: ['https://i.imgur.com/VEyRqDR.png', 'https://i.imgur.com/wQ4wqeh.gif', 'https://i.imgur.com/URYSqL5.gif']
|
||||
}],
|
||||
|
||||
['leeprky/Slook', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['224524143482241035'],
|
||||
images: [
|
||||
'https://raw.githubusercontent.com/leeprky/slook_theme/main/previews/dark1.jpg',
|
||||
'https://raw.githubusercontent.com/leeprky/slook_theme/main/previews/dark2.jpg',
|
||||
'https://raw.githubusercontent.com/leeprky/slook_theme/main/previews/dark3.png',
|
||||
'https://raw.githubusercontent.com/leeprky/slook_theme/main/previews/dark4.jpg',
|
||||
|
||||
'https://raw.githubusercontent.com/leeprky/slook_theme/main/previews/light1.jpg',
|
||||
'https://raw.githubusercontent.com/leeprky/slook_theme/main/previews/light2.jpg',
|
||||
'https://raw.githubusercontent.com/leeprky/slook_theme/main/previews/light3.png',
|
||||
'https://raw.githubusercontent.com/leeprky/slook_theme/main/previews/light4.jpg'
|
||||
]
|
||||
}],
|
||||
|
||||
['sneexy-boi/material-cord', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['468894601542107146', '452289159399342090'],
|
||||
images: ['https://raw.githubusercontent.com/sneexy-boi/material-cord/main/docs/screenshot.png']
|
||||
}],
|
||||
|
||||
['leeprky/Naive', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['224524143482241035'],
|
||||
images: ['https://raw.githubusercontent.com/leeprky/Naive/main/previews/cherry-glasscord.jpg']
|
||||
}],
|
||||
|
||||
['LuckFire/midnight-mars', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["399416615742996480"],
|
||||
images: []
|
||||
}],
|
||||
|
||||
['LuckFire/amoled-cord', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["399416615742996480"],
|
||||
images: ['https://raw.githubusercontent.com/LuckFire/amoled-cord/main/screenshots/main-preview.png']
|
||||
}],
|
||||
|
||||
['Freeplayg/discord-serverlist-drawer', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["158296466119458816"],
|
||||
images: ["https://codeberg.org/Freeplay/UserStyles/raw/branch/main/images/discord_serverlist-drawer-1.png"]
|
||||
}],
|
||||
|
||||
['Freeplayg/discord-AnotherSidebar', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["158296466119458816"],
|
||||
images: ["https://i.imgur.com/J95Re46.png"]
|
||||
}],
|
||||
|
||||
['LuckFire/Discord-Revamp', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['399416615742996480'],
|
||||
images: ['https://raw.githubusercontent.com/LuckFire/discord-revamp/master/screenshots/preview.png']
|
||||
}],
|
||||
|
||||
['Awish-Senpai/Evernight', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["671355502399193128"],
|
||||
images: ["https://i.imgur.com/5eF3dAE.png","https://i.imgur.com/yD7IAEe.png","https://i.imgur.com/bEgMxYm.png"]
|
||||
}],
|
||||
|
||||
['spinfish/kaleidoscope', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["574870314928832533"],
|
||||
images: ["https://cdn.discordapp.com/attachments/715106442406920273/835786520216338452/kaleidoscope_preview_one.png","https://cdn.discordapp.com/attachments/715106442406920273/835786531616063538/kaleidoscope_preview_two.png","https://cdn.discordapp.com/attachments/715106442406920273/835786526864441344/kaleidoscope_preview_three.png"]
|
||||
}],
|
||||
|
||||
['leeprky/Lode', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["224524143482241035"],
|
||||
images: ["https://raw.githubusercontent.com/leeprky/Lode/main/default/images/LodeTheme.png"]
|
||||
}],
|
||||
|
||||
['spinfish/midnight-candy-powercord', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["574870314928832533"],
|
||||
images: ["https://media.discordapp.net/attachments/678012423067926539/837311603954941962/midnight_candy_main_preview.png","https://media.discordapp.net/attachments/678012423067926539/837312429749829713/midnight_candy_preview_two.png","https://media.discordapp.net/attachments/678012423067926539/837312453544902706/midnight_candy_preview_three.png"]
|
||||
}],
|
||||
|
||||
['NYRI4/LilyPichu', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["265924886461939712"],
|
||||
images: ["https://nyri4.github.io/LilyPichu/assets/capture.png"]
|
||||
}],
|
||||
|
||||
['NYRI4/Discolored', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["265924886461939712"],
|
||||
images: ["https://nyri4.github.io/Discolored/assets/screenshot.png"]
|
||||
}],
|
||||
|
||||
['DiscordStyles/DarkMatter', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["254362351170617345"],
|
||||
images: ["https://i.imgur.com/xSG96qa.png"]
|
||||
}, true],
|
||||
|
||||
['Goose-Nest/GT-RevertRebrand', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["506482395269169153"],
|
||||
images: ['https://raw.githubusercontent.com/Goose-Nest/GT-RevertRebrand/main/screenshots/message_revert.png']
|
||||
}],
|
||||
|
||||
['Goose-Nest/GT-VSCHighContrast', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["506482395269169153"],
|
||||
images: []
|
||||
}],
|
||||
|
||||
['doggybootsy/Dribbblish', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["515780151791976453"],
|
||||
images: ["https://media.discordapp.net/attachments/755005710323941386/842483963900723200/Screen_Shot_2021-05-13_at_12.29.50_PM.png"]
|
||||
}],
|
||||
|
||||
['leeprky/Quarrel', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["224524143482241035"],
|
||||
images: ["https://i.imgur.com/6bvkEoD.png"]
|
||||
}],
|
||||
|
||||
['Discord-Theme-Addons/refined-user-connections', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['399416615742996480'],
|
||||
images: ['https://raw.githubusercontent.com/Discord-Theme-Addons/refined-user-connections/main/screenshots/preview.png']
|
||||
}],
|
||||
|
||||
['Discord-Theme-Addons/compact-userarea', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ['399416615742996480'],
|
||||
images: ['https://raw.githubusercontent.com/Discord-Theme-Addons/compact-userarea/main/screenshots/preview.png']
|
||||
}],
|
||||
|
||||
['4n4hits/ForestFrost', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["812815155288473630"],
|
||||
images: ["https://i.vgy.me/k2KPcP.png"]
|
||||
}],
|
||||
|
||||
['kreat0/the-nightowl', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["647480386577760256"],
|
||||
images: ["https://raw.githubusercontent.com/kreat0/the-nightowl/master/assets/screenshot.png"]
|
||||
}],
|
||||
|
||||
['kixt0/shuttle', '', '/manifest.json', 'pcTheme', {
|
||||
authors: ["452289159399342090"],
|
||||
images: ["https://raw.githubusercontent.com/kixt0/shuttle/main/docs/screenshot.png"]
|
||||
}],
|
||||
|
||||
['mr-miner1/Better-Badges', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["678541597654253600"],
|
||||
images: ["https://i.imgur.com/0Fkk8TL.gif"]
|
||||
}],
|
||||
|
||||
['schnensch0/zelk', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["652801938374656013"],
|
||||
images: ["https://raw.githubusercontent.com/schnensch0/zelk/main/preview/chat.png","https://raw.githubusercontent.com/schnensch0/zelk/main/preview/profile.png","https://raw.githubusercontent.com/schnensch0/zelk/main/preview/settings.png"]
|
||||
}],
|
||||
|
||||
['NYRI4/Couve', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["264062457448759296","265924886461939712"],
|
||||
images: ["https://cdn.discordapp.com/attachments/539180316447997974/725737819015872562/unknown.png"]
|
||||
}],
|
||||
|
||||
['PhoenixAceVFX/Aroma-White', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["461440763042201620"],
|
||||
images: ["https://raw.githubusercontent.com/PhoenixAceVFX/Aroma-White/main/BDx3p2gh.png"]
|
||||
}],
|
||||
|
||||
['XYZenix/DTM-08', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["211270674482724864"],
|
||||
images: ["https://cdn.discordapp.com/attachments/733624227378495488/839835186211717120/unknown.png"]
|
||||
}],
|
||||
|
||||
['XYZenix/DTM-16', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["211270674482724864"],
|
||||
images: ["https://media.discordapp.net/attachments/755005710323941386/771068422079250432/unknown.png"]
|
||||
}],
|
||||
|
||||
['leeprky/Ovel', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["224524143482241035"],
|
||||
images: ["https://media.discordapp.net/attachments/828218219927306261/853635731581960192/Ovel_v1.0.0.png","https://i.imgur.com/3BMUuND.png","https://i.imgur.com/csW8EoK.png","https://i.imgur.com/Otv0JjS.png"]
|
||||
}],
|
||||
|
||||
['CorellanStoma/CreArts', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["288362986991648778"],
|
||||
images: ["https://user-images.githubusercontent.com/58918358/122546272-14722f80-d02f-11eb-9025-f6f351d24fbe.png","https://user-images.githubusercontent.com/58918358/122546285-16d48980-d02f-11eb-86a7-0eee638561d3.png"]
|
||||
}],
|
||||
|
||||
['mr-miner1/Deep-Dark', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["678541597654253600"],
|
||||
images: ["https://i.imgur.com/erTtLUi.gif"]
|
||||
}],
|
||||
|
||||
['PrincessAkira/Green-Akali', '', '/powercord_manifest.json', 'pcTheme', {
|
||||
authors: ["202740603790819328"],
|
||||
images: ["https://host.snens.team/i/FcLwBnjmIqWo.png","https://host.snens.team/i/5EdBAjhcNzmk.png"]
|
||||
}],
|
||||
];
|
||||
>>>>>>> 606a100 ([Feat] Local images building)
|
||||
|
|
Loading…
Reference in New Issue