summary refs log tree commit diff
path: root/bundle
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-15 21:56:30 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-15 21:56:30 +0200
commitdbdfbf61f29f6e454c0543c977afb4061d24afa8 (patch)
tree25f6ca9692eeda3cdb6657aec0b4ee87c1acdedb /bundle
parent:bug: prevent @everyone role deletion (diff)
downloadserver-dbdfbf61f29f6e454c0543c977afb4061d24afa8.tar.xz
:bug: fix server bundle
Diffstat (limited to 'bundle')
-rw-r--r--bundle/package-lock.json702
-rw-r--r--bundle/package.json11
-rw-r--r--bundle/src/BundledServer.ts41
-rw-r--r--bundle/src/Database.ts2
-rw-r--r--bundle/src/Server.ts24
-rw-r--r--bundle/src/stats.ts2
6 files changed, 650 insertions, 132 deletions
diff --git a/bundle/package-lock.json b/bundle/package-lock.json
index bd3b4a98..7cf5dac2 100644
--- a/bundle/package-lock.json
+++ b/bundle/package-lock.json
@@ -7,41 +7,41 @@
 		"": {
 			"name": "@fosscord/server",
 			"version": "1.0.0",
-			"hasInstallScript": true,
 			"license": "AGPLV3",
 			"dependencies": {
 				"@fosscord/api": "file:../api",
 				"@fosscord/cdn": "file:../cdn",
 				"@fosscord/gateway": "file:../gateway",
 				"@fosscord/util": "file:../util",
-				"@types/async-exit-hook": "^2.0.0",
-				"@types/express": "^4.17.13",
-				"@types/node": "^16.6.1",
-				"@types/node-os-utils": "^1.2.0",
 				"async-exit-hook": "^2.0.1",
 				"express": "^4.17.1",
 				"mongodb-memory-server": "^7.3.6",
-				"node-os-utils": "^1.3.5",
-				"typescript": "^4.3.5"
-			}
-		},
-		"../api": {
-			"name": "@fosscord/api",
-			"version": "1.0.0",
-			"license": "ISC",
-			"dependencies": {
-				"@fosscord/util": "file:../util",
+				"node-os-utils": "^1.3.5"
+			},
+			"devDependencies": {
 				"@types/amqplib": "^0.8.1",
 				"@types/bcrypt": "^5.0.0",
 				"@types/express": "^4.17.9",
 				"@types/i18next-node-fs-backend": "^2.1.0",
-				"@types/jest": "^26.0.22",
-				"@types/json-schema": "^7.0.7",
 				"@types/jsonwebtoken": "^8.5.0",
+				"@types/mongodb": "^3.6.9",
+				"@types/mongoose-autopopulate": "^0.10.1",
+				"@types/mongoose-lean-virtuals": "^0.5.1",
 				"@types/multer": "^1.4.5",
 				"@types/node": "^14.17.9",
 				"@types/node-fetch": "^2.5.7",
+				"@types/uuid": "^8.3.0",
+				"@types/ws": "^7.4.0",
 				"@zerollup/ts-transform-paths": "^1.7.18",
+				"typescript": "^4.3.5"
+			}
+		},
+		"../api": {
+			"name": "@fosscord/api",
+			"version": "1.0.0",
+			"license": "ISC",
+			"dependencies": {
+				"@fosscord/util": "file:../util",
 				"ajv": "^8.4.0",
 				"ajv-formats": "^2.1.0",
 				"amqplib": "^0.8.0",
@@ -59,7 +59,6 @@
 				"i18next": "^19.8.5",
 				"i18next-http-middleware": "^3.1.3",
 				"i18next-node-fs-backend": "^2.1.3",
-				"image-size": "^1.0.0",
 				"jsonwebtoken": "^8.5.1",
 				"lambert-server": "^1.2.8",
 				"missing-native-js-functions": "^1.2.6",
@@ -67,8 +66,27 @@
 				"mongoose-autopopulate": "^0.12.3",
 				"mongoose-long": "^0.3.2",
 				"multer": "^1.4.2",
-				"node-fetch": "^2.6.1",
-				"require_optional": "^1.0.1",
+				"node-fetch": "^2.6.1"
+			},
+			"devDependencies": {
+				"@types/amqplib": "^0.8.1",
+				"@types/bcrypt": "^5.0.0",
+				"@types/express": "^4.17.9",
+				"@types/i18next-node-fs-backend": "^2.1.0",
+				"@types/jsonwebtoken": "^8.5.0",
+				"@types/mongodb": "^3.6.9",
+				"@types/mongoose-autopopulate": "^0.10.1",
+				"@types/mongoose-lean-virtuals": "^0.5.1",
+				"@types/multer": "^1.4.5",
+				"@types/node": "^14.17.9",
+				"@types/node-fetch": "^2.5.7",
+				"@zerollup/ts-transform-paths": "^1.7.18",
+				"0x": "^4.10.2",
+				"caxa": "^2.1.0",
+				"image-size": "^1.0.0",
+				"jest": "^26.6.3",
+				"saslprep": "^1.0.3",
+				"ts-node": "^9.1.1",
 				"ts-node-dev": "^1.1.6",
 				"typescript": "^4.1.2"
 			}
@@ -79,15 +97,6 @@
 			"license": "ISC",
 			"dependencies": {
 				"@fosscord/util": "file:../util",
-				"@types/body-parser": "^1.19.0",
-				"@types/btoa": "^1.2.3",
-				"@types/dotenv": "^8.2.0",
-				"@types/express": "^4.17.12",
-				"@types/fs-extra": "^9.0.12",
-				"@types/multer": "^1.4.7",
-				"@types/node": "^14.17.0",
-				"@types/node-fetch": "^2.5.7",
-				"@types/uuid": "^8.3.0",
 				"body-parser": "^1.19.0",
 				"btoa": "^1.2.1",
 				"cheerio": "^1.0.0-rc.5",
@@ -105,6 +114,22 @@
 				"node-fetch": "^2.6.1",
 				"typescript": "^4.1.2",
 				"uuid": "^8.3.2"
+			},
+			"devDependencies": {
+				"@types/amqplib": "^0.8.1",
+				"@types/body-parser": "^1.19.0",
+				"@types/btoa": "^1.2.3",
+				"@types/dotenv": "^8.2.0",
+				"@types/express": "^4.17.12",
+				"@types/fs-extra": "^9.0.12",
+				"@types/jsonwebtoken": "^8.5.0",
+				"@types/mongodb": "^3.6.9",
+				"@types/mongoose-autopopulate": "^0.10.1",
+				"@types/mongoose-lean-virtuals": "^0.5.1",
+				"@types/multer": "^1.4.7",
+				"@types/node": "^14.17.0",
+				"@types/node-fetch": "^2.5.7",
+				"@types/uuid": "^8.3.0"
 			}
 		},
 		"../gateway": {
@@ -113,11 +138,6 @@
 			"license": "ISC",
 			"dependencies": {
 				"@fosscord/util": "file:../util",
-				"@types/amqplib": "^0.8.1",
-				"@types/jsonwebtoken": "^8.5.0",
-				"@types/mongoose-autopopulate": "^0.10.1",
-				"@types/uuid": "^8.3.0",
-				"@types/ws": "^7.4.0",
 				"ajv": "^8.5.0",
 				"amqplib": "^0.8.0",
 				"dotenv": "^8.2.0",
@@ -126,10 +146,21 @@
 				"missing-native-js-functions": "^1.2.3",
 				"mongoose-autopopulate": "^0.12.3",
 				"node-fetch": "^2.6.1",
-				"ts-node-dev": "^1.1.6",
-				"typescript": "^4.2.3",
 				"uuid": "^8.3.2",
 				"ws": "^7.4.2"
+			},
+			"devDependencies": {
+				"@types/amqplib": "^0.8.1",
+				"@types/jsonwebtoken": "^8.5.0",
+				"@types/mongodb": "^3.6.9",
+				"@types/mongoose-autopopulate": "^0.10.1",
+				"@types/mongoose-lean-virtuals": "^0.5.1",
+				"@types/node": "^14.17.9",
+				"@types/node-fetch": "^2.5.12",
+				"@types/uuid": "^8.3.0",
+				"@types/ws": "^7.4.0",
+				"ts-node-dev": "^1.1.6",
+				"typescript": "^4.2.3"
 			}
 		},
 		"../util": {
@@ -138,13 +169,6 @@
 			"hasInstallScript": true,
 			"license": "GPLV3",
 			"dependencies": {
-				"@types/amqplib": "^0.8.1",
-				"@types/jsonwebtoken": "^8.5.0",
-				"@types/mongodb": "^3.6.9",
-				"@types/mongoose-autopopulate": "^0.10.1",
-				"@types/mongoose-lean-virtuals": "^0.5.1",
-				"@types/node": "^14.17.9",
-				"@types/node-fetch": "^2.5.12",
 				"ajv": "^8.5.0",
 				"amqplib": "^0.8.0",
 				"dot-prop": "^6.0.1",
@@ -156,6 +180,27 @@
 				"mongoose-autopopulate": "^0.12.3",
 				"node-fetch": "^2.6.1",
 				"typescript": "^4.1.3"
+			},
+			"devDependencies": {
+				"@types/amqplib": "^0.8.1",
+				"@types/jsonwebtoken": "^8.5.0",
+				"@types/mongodb": "^3.6.9",
+				"@types/mongoose-autopopulate": "^0.10.1",
+				"@types/mongoose-lean-virtuals": "^0.5.1",
+				"@types/node": "^14.17.9",
+				"@types/node-fetch": "^2.5.12"
+			}
+		},
+		"node_modules/@babel/runtime": {
+			"version": "7.15.3",
+			"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz",
+			"integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==",
+			"dev": true,
+			"dependencies": {
+				"regenerator-runtime": "^0.13.4"
+			},
+			"engines": {
+				"node": ">=6.9.0"
 			}
 		},
 		"node_modules/@fosscord/api": {
@@ -174,24 +219,55 @@
 			"resolved": "../util",
 			"link": true
 		},
-		"node_modules/@types/async-exit-hook": {
-			"version": "2.0.0",
-			"resolved": "https://registry.npmjs.org/@types/async-exit-hook/-/async-exit-hook-2.0.0.tgz",
-			"integrity": "sha512-RNjIyjnVZdcP5a1zeIPb5c0hq2nbJc/NOCLNKUAqeCw+J5z2zMcINISn9wybCWhczHnUu3VSUFy7ZCO6ir4ZRw=="
+		"node_modules/@types/amqplib": {
+			"version": "0.8.1",
+			"resolved": "https://registry.npmjs.org/@types/amqplib/-/amqplib-0.8.1.tgz",
+			"integrity": "sha512-8dCjF+dHZ8Y6JOoHD1BMnxP0quAncvZq4wA/lS072NjX9vIzVRSMcmfKy2Os8ZQ8VWWp74MD09GMbVbKS6/Fxw==",
+			"dev": true,
+			"dependencies": {
+				"@types/bluebird": "*",
+				"@types/node": "*"
+			}
+		},
+		"node_modules/@types/bcrypt": {
+			"version": "5.0.0",
+			"resolved": "https://registry.npmjs.org/@types/bcrypt/-/bcrypt-5.0.0.tgz",
+			"integrity": "sha512-agtcFKaruL8TmcvqbndlqHPSJgsolhf/qPWchFlgnW1gECTN/nKbFcoFnvKAQRFfKbh+BO6A3SWdJu9t+xF3Lw==",
+			"dev": true,
+			"dependencies": {
+				"@types/node": "*"
+			}
+		},
+		"node_modules/@types/bluebird": {
+			"version": "3.5.36",
+			"resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.36.tgz",
+			"integrity": "sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==",
+			"dev": true
 		},
 		"node_modules/@types/body-parser": {
 			"version": "1.19.1",
 			"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.1.tgz",
 			"integrity": "sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg==",
+			"dev": true,
 			"dependencies": {
 				"@types/connect": "*",
 				"@types/node": "*"
 			}
 		},
+		"node_modules/@types/bson": {
+			"version": "4.0.5",
+			"resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.5.tgz",
+			"integrity": "sha512-vVLwMUqhYJSQ/WKcE60eFqcyuWse5fGH+NMAXHuKrUAPoryq3ATxk5o4bgYNtg5aOM4APVg7Hnb3ASqUYG0PKg==",
+			"dev": true,
+			"dependencies": {
+				"@types/node": "*"
+			}
+		},
 		"node_modules/@types/connect": {
 			"version": "3.4.35",
 			"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
 			"integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
+			"dev": true,
 			"dependencies": {
 				"@types/node": "*"
 			}
@@ -200,6 +276,7 @@
 			"version": "4.17.13",
 			"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
 			"integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
+			"dev": true,
 			"dependencies": {
 				"@types/body-parser": "*",
 				"@types/express-serve-static-core": "^4.17.18",
@@ -211,41 +288,117 @@
 			"version": "4.17.24",
 			"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.24.tgz",
 			"integrity": "sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA==",
+			"dev": true,
 			"dependencies": {
 				"@types/node": "*",
 				"@types/qs": "*",
 				"@types/range-parser": "*"
 			}
 		},
+		"node_modules/@types/i18next-node-fs-backend": {
+			"version": "2.1.1",
+			"resolved": "https://registry.npmjs.org/@types/i18next-node-fs-backend/-/i18next-node-fs-backend-2.1.1.tgz",
+			"integrity": "sha512-ESvH90OICQkKU3yuuRzF6YfHt5KACE55FOiUM59mMGnC+h03lHGdEYo3z3THbwS5FdMskLyIs2O7f6Oaz8P9sw==",
+			"dev": true,
+			"dependencies": {
+				"i18next": ">=17.0.11"
+			}
+		},
+		"node_modules/@types/jsonwebtoken": {
+			"version": "8.5.4",
+			"resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.4.tgz",
+			"integrity": "sha512-4L8msWK31oXwdtC81RmRBAULd0ShnAHjBuKT9MRQpjP0piNrZdXyTRcKY9/UIfhGeKIT4PvF5amOOUbbT/9Wpg==",
+			"dev": true,
+			"dependencies": {
+				"@types/node": "*"
+			}
+		},
 		"node_modules/@types/mime": {
 			"version": "1.3.2",
 			"resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
-			"integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw=="
+			"integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==",
+			"dev": true
+		},
+		"node_modules/@types/mongodb": {
+			"version": "3.6.20",
+			"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.20.tgz",
+			"integrity": "sha512-WcdpPJCakFzcWWD9juKoZbRtQxKIMYF/JIAM4JrNHrMcnJL6/a2NWjXxW7fo9hxboxxkg+icff8d7+WIEvKgYQ==",
+			"dev": true,
+			"dependencies": {
+				"@types/bson": "*",
+				"@types/node": "*"
+			}
+		},
+		"node_modules/@types/mongoose": {
+			"version": "5.10.5",
+			"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.10.5.tgz",
+			"integrity": "sha512-37QMIA954T3n+HSksSNLlxZsqF8fMJu5S4dyPBod6gRxGtsXlQ9jUtL8BE8Seimv99u79eLXI3bggoCnSQ/fxQ==",
+			"dev": true,
+			"dependencies": {
+				"@types/mongodb": "*",
+				"@types/node": "*"
+			}
+		},
+		"node_modules/@types/mongoose-autopopulate": {
+			"version": "0.10.2",
+			"resolved": "https://registry.npmjs.org/@types/mongoose-autopopulate/-/mongoose-autopopulate-0.10.2.tgz",
+			"integrity": "sha512-YSxSEhszXK9E+7VRLdpYjkXqcRXOPFtG0xZea9n7A+oaHhZ1lSVBm/WvK2Rr746NPrTm/k1tR6uezyG6kyinyg==",
+			"dev": true,
+			"dependencies": {
+				"@types/mongoose": "5.10.5"
+			}
+		},
+		"node_modules/@types/mongoose-lean-virtuals": {
+			"version": "0.5.2",
+			"resolved": "https://registry.npmjs.org/@types/mongoose-lean-virtuals/-/mongoose-lean-virtuals-0.5.2.tgz",
+			"integrity": "sha512-TpAX2RkFXLtNjyciiYxdvYpVuCAv/g1alFTl4ErJWvSOA+DuNDNvfXSH3c8/DXC1ZBzO47TCwHaxI/PET4sqxQ==",
+			"dev": true,
+			"dependencies": {
+				"@types/mongoose": "5.10.5"
+			}
+		},
+		"node_modules/@types/multer": {
+			"version": "1.4.7",
+			"resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.7.tgz",
+			"integrity": "sha512-/SNsDidUFCvqqcWDwxv2feww/yqhNeTRL5CVoL3jU4Goc4kKEL10T7Eye65ZqPNi4HRx8sAEX59pV1aEH7drNA==",
+			"dev": true,
+			"dependencies": {
+				"@types/express": "*"
+			}
 		},
 		"node_modules/@types/node": {
-			"version": "16.6.1",
-			"resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz",
-			"integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw=="
+			"version": "14.17.9",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.9.tgz",
+			"integrity": "sha512-CMjgRNsks27IDwI785YMY0KLt3co/c0cQ5foxHYv/shC2w8oOnVwz5Ubq1QG5KzrcW+AXk6gzdnxIkDnTvzu3g==",
+			"dev": true
 		},
-		"node_modules/@types/node-os-utils": {
-			"version": "1.2.0",
-			"resolved": "https://registry.npmjs.org/@types/node-os-utils/-/node-os-utils-1.2.0.tgz",
-			"integrity": "sha512-sstDo2s8gQR/Qh2Bd6yNQ5xJv+D4ttyB9ZVjB3mBm3VkGl2RoqjV7fiw9mIHLbshHSRm2m8uf0XrIRQNWB/z6A=="
+		"node_modules/@types/node-fetch": {
+			"version": "2.5.12",
+			"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
+			"integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
+			"dev": true,
+			"dependencies": {
+				"@types/node": "*",
+				"form-data": "^3.0.0"
+			}
 		},
 		"node_modules/@types/qs": {
 			"version": "6.9.7",
 			"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
-			"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw=="
+			"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
+			"dev": true
 		},
 		"node_modules/@types/range-parser": {
 			"version": "1.2.4",
 			"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
-			"integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw=="
+			"integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
+			"dev": true
 		},
 		"node_modules/@types/serve-static": {
 			"version": "1.13.10",
 			"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz",
 			"integrity": "sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==",
+			"dev": true,
 			"dependencies": {
 				"@types/mime": "^1",
 				"@types/node": "*"
@@ -256,6 +409,45 @@
 			"resolved": "https://registry.npmjs.org/@types/tmp/-/tmp-0.2.1.tgz",
 			"integrity": "sha512-7cTXwKP/HLOPVgjg+YhBdQ7bMiobGMuoBmrGmqwIWJv8elC6t1DfVc/mn4fD9UE1IjhwmhaQ5pGVXkmXbH0rhg=="
 		},
+		"node_modules/@types/uuid": {
+			"version": "8.3.1",
+			"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.1.tgz",
+			"integrity": "sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg==",
+			"dev": true
+		},
+		"node_modules/@types/ws": {
+			"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": "*"
+			}
+		},
+		"node_modules/@zerollup/ts-helpers": {
+			"version": "1.7.18",
+			"resolved": "https://registry.npmjs.org/@zerollup/ts-helpers/-/ts-helpers-1.7.18.tgz",
+			"integrity": "sha512-S9zN+y+i5yN/evfWquzSO3lubqPXIsPQf6p9OiPMpRxDx/0totPLF39XoRw48Dav5dSvbIE8D2eAPpXXJxvKwg==",
+			"dev": true,
+			"dependencies": {
+				"resolve": "^1.12.0"
+			},
+			"peerDependencies": {
+				"typescript": ">=3.7.2"
+			}
+		},
+		"node_modules/@zerollup/ts-transform-paths": {
+			"version": "1.7.18",
+			"resolved": "https://registry.npmjs.org/@zerollup/ts-transform-paths/-/ts-transform-paths-1.7.18.tgz",
+			"integrity": "sha512-YPVUxvWQVzRx1OBN0Pmkd58+R9FcfUJuwTaPUSoi5rKxuXMtxevTXdfi0w5mEaIH8b0DfL+wg0wFDHiJE+S2zA==",
+			"dev": true,
+			"dependencies": {
+				"@zerollup/ts-helpers": "^1.7.18"
+			},
+			"peerDependencies": {
+				"typescript": ">=3.7.2"
+			}
+		},
 		"node_modules/accepts": {
 			"version": "1.3.7",
 			"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
@@ -321,6 +513,12 @@
 				"tslib": "^2.1.0"
 			}
 		},
+		"node_modules/asynckit": {
+			"version": "0.4.0",
+			"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+			"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+			"dev": true
+		},
 		"node_modules/balanced-match": {
 			"version": "1.0.2",
 			"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -441,6 +639,18 @@
 				"url": "https://github.com/sponsors/sindresorhus"
 			}
 		},
+		"node_modules/combined-stream": {
+			"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"
+			},
+			"engines": {
+				"node": ">= 0.8"
+			}
+		},
 		"node_modules/commondir": {
 			"version": "1.0.1",
 			"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
@@ -496,6 +706,15 @@
 				"ms": "2.0.0"
 			}
 		},
+		"node_modules/delayed-stream": {
+			"version": "1.0.0",
+			"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+			"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+			"dev": true,
+			"engines": {
+				"node": ">=0.4.0"
+			}
+		},
 		"node_modules/denque": {
 			"version": "1.5.0",
 			"resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz",
@@ -644,6 +863,20 @@
 				"node": ">=8"
 			}
 		},
+		"node_modules/form-data": {
+			"version": "3.0.1",
+			"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
+			"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
+			"dev": true,
+			"dependencies": {
+				"asynckit": "^0.4.0",
+				"combined-stream": "^1.0.8",
+				"mime-types": "^2.1.12"
+			},
+			"engines": {
+				"node": ">= 6"
+			}
+		},
 		"node_modules/forwarded": {
 			"version": "0.2.0",
 			"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@@ -670,6 +903,12 @@
 			"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
 			"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
 		},
+		"node_modules/function-bind": {
+			"version": "1.1.1",
+			"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+			"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+			"dev": true
+		},
 		"node_modules/get-port": {
 			"version": "5.1.1",
 			"resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz",
@@ -700,6 +939,18 @@
 				"url": "https://github.com/sponsors/isaacs"
 			}
 		},
+		"node_modules/has": {
+			"version": "1.0.3",
+			"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+			"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+			"dev": true,
+			"dependencies": {
+				"function-bind": "^1.1.1"
+			},
+			"engines": {
+				"node": ">= 0.4.0"
+			}
+		},
 		"node_modules/http-errors": {
 			"version": "1.7.2",
 			"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
@@ -748,6 +999,15 @@
 			"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
 			"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
 		},
+		"node_modules/i18next": {
+			"version": "20.4.0",
+			"resolved": "https://registry.npmjs.org/i18next/-/i18next-20.4.0.tgz",
+			"integrity": "sha512-89iWWJudmaHJwzIdJ/1eu98GtsJnwBhOUWwlAre70itPMuTE/NTPtgVeaS1CGaB8Q3XrYBGpEqlq4jsScDx9kg==",
+			"dev": true,
+			"dependencies": {
+				"@babel/runtime": "^7.12.0"
+			}
+		},
 		"node_modules/iconv-lite": {
 			"version": "0.4.24",
 			"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -800,6 +1060,18 @@
 				"node": ">= 0.10"
 			}
 		},
+		"node_modules/is-core-module": {
+			"version": "2.5.0",
+			"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz",
+			"integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==",
+			"dev": true,
+			"dependencies": {
+				"has": "^1.0.3"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/ljharb"
+			}
+		},
 		"node_modules/isarray": {
 			"version": "1.0.0",
 			"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@@ -1176,6 +1448,12 @@
 				"node": ">=0.10.0"
 			}
 		},
+		"node_modules/path-parse": {
+			"version": "1.0.7",
+			"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+			"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+			"dev": true
+		},
 		"node_modules/path-to-regexp": {
 			"version": "0.1.7",
 			"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
@@ -1258,6 +1536,12 @@
 				"util-deprecate": "~1.0.1"
 			}
 		},
+		"node_modules/regenerator-runtime": {
+			"version": "0.13.9",
+			"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
+			"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==",
+			"dev": true
+		},
 		"node_modules/require-at": {
 			"version": "1.0.6",
 			"resolved": "https://registry.npmjs.org/require-at/-/require-at-1.0.6.tgz",
@@ -1266,6 +1550,19 @@
 				"node": ">=4"
 			}
 		},
+		"node_modules/resolve": {
+			"version": "1.20.0",
+			"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
+			"integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
+			"dev": true,
+			"dependencies": {
+				"is-core-module": "^2.2.0",
+				"path-parse": "^1.0.6"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/ljharb"
+			}
+		},
 		"node_modules/rimraf": {
 			"version": "3.0.2",
 			"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -1471,6 +1768,7 @@
 			"version": "4.3.5",
 			"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
 			"integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
+			"dev": true,
 			"bin": {
 				"tsc": "bin/tsc",
 				"tsserver": "bin/tsserver"
@@ -1537,6 +1835,15 @@
 		}
 	},
 	"dependencies": {
+		"@babel/runtime": {
+			"version": "7.15.3",
+			"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz",
+			"integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==",
+			"dev": true,
+			"requires": {
+				"regenerator-runtime": "^0.13.4"
+			}
+		},
 		"@fosscord/api": {
 			"version": "file:../api",
 			"requires": {
@@ -1545,13 +1852,15 @@
 				"@types/bcrypt": "^5.0.0",
 				"@types/express": "^4.17.9",
 				"@types/i18next-node-fs-backend": "^2.1.0",
-				"@types/jest": "^26.0.22",
-				"@types/json-schema": "^7.0.7",
 				"@types/jsonwebtoken": "^8.5.0",
+				"@types/mongodb": "^3.6.9",
+				"@types/mongoose-autopopulate": "^0.10.1",
+				"@types/mongoose-lean-virtuals": "^0.5.1",
 				"@types/multer": "^1.4.5",
 				"@types/node": "^14.17.9",
 				"@types/node-fetch": "^2.5.7",
 				"@zerollup/ts-transform-paths": "^1.7.18",
+				"0x": "^4.10.2",
 				"ajv": "^8.4.0",
 				"ajv-formats": "^2.1.0",
 				"amqplib": "^0.8.0",
@@ -1559,6 +1868,7 @@
 				"atomically": "^1.7.0",
 				"bcrypt": "^5.0.1",
 				"body-parser": "^1.19.0",
+				"caxa": "^2.1.0",
 				"cheerio": "^1.0.0-rc.9",
 				"dot-prop": "^6.0.1",
 				"dotenv": "^8.2.0",
@@ -1570,6 +1880,7 @@
 				"i18next-http-middleware": "^3.1.3",
 				"i18next-node-fs-backend": "^2.1.3",
 				"image-size": "^1.0.0",
+				"jest": "^26.6.3",
 				"jsonwebtoken": "^8.5.1",
 				"lambert-server": "^1.2.8",
 				"missing-native-js-functions": "^1.2.6",
@@ -1578,7 +1889,8 @@
 				"mongoose-long": "^0.3.2",
 				"multer": "^1.4.2",
 				"node-fetch": "^2.6.1",
-				"require_optional": "^1.0.1",
+				"saslprep": "^1.0.3",
+				"ts-node": "^9.1.1",
 				"ts-node-dev": "^1.1.6",
 				"typescript": "^4.1.2"
 			}
@@ -1587,11 +1899,16 @@
 			"version": "file:../cdn",
 			"requires": {
 				"@fosscord/util": "file:../util",
+				"@types/amqplib": "^0.8.1",
 				"@types/body-parser": "^1.19.0",
 				"@types/btoa": "^1.2.3",
 				"@types/dotenv": "^8.2.0",
 				"@types/express": "^4.17.12",
 				"@types/fs-extra": "^9.0.12",
+				"@types/jsonwebtoken": "^8.5.0",
+				"@types/mongodb": "^3.6.9",
+				"@types/mongoose-autopopulate": "^0.10.1",
+				"@types/mongoose-lean-virtuals": "^0.5.1",
 				"@types/multer": "^1.4.7",
 				"@types/node": "^14.17.0",
 				"@types/node-fetch": "^2.5.7",
@@ -1621,7 +1938,11 @@
 				"@fosscord/util": "file:../util",
 				"@types/amqplib": "^0.8.1",
 				"@types/jsonwebtoken": "^8.5.0",
+				"@types/mongodb": "^3.6.9",
 				"@types/mongoose-autopopulate": "^0.10.1",
+				"@types/mongoose-lean-virtuals": "^0.5.1",
+				"@types/node": "^14.17.9",
+				"@types/node-fetch": "^2.5.12",
 				"@types/uuid": "^8.3.0",
 				"@types/ws": "^7.4.0",
 				"ajv": "^8.5.0",
@@ -1661,24 +1982,55 @@
 				"typescript": "^4.1.3"
 			}
 		},
-		"@types/async-exit-hook": {
-			"version": "2.0.0",
-			"resolved": "https://registry.npmjs.org/@types/async-exit-hook/-/async-exit-hook-2.0.0.tgz",
-			"integrity": "sha512-RNjIyjnVZdcP5a1zeIPb5c0hq2nbJc/NOCLNKUAqeCw+J5z2zMcINISn9wybCWhczHnUu3VSUFy7ZCO6ir4ZRw=="
+		"@types/amqplib": {
+			"version": "0.8.1",
+			"resolved": "https://registry.npmjs.org/@types/amqplib/-/amqplib-0.8.1.tgz",
+			"integrity": "sha512-8dCjF+dHZ8Y6JOoHD1BMnxP0quAncvZq4wA/lS072NjX9vIzVRSMcmfKy2Os8ZQ8VWWp74MD09GMbVbKS6/Fxw==",
+			"dev": true,
+			"requires": {
+				"@types/bluebird": "*",
+				"@types/node": "*"
+			}
+		},
+		"@types/bcrypt": {
+			"version": "5.0.0",
+			"resolved": "https://registry.npmjs.org/@types/bcrypt/-/bcrypt-5.0.0.tgz",
+			"integrity": "sha512-agtcFKaruL8TmcvqbndlqHPSJgsolhf/qPWchFlgnW1gECTN/nKbFcoFnvKAQRFfKbh+BO6A3SWdJu9t+xF3Lw==",
+			"dev": true,
+			"requires": {
+				"@types/node": "*"
+			}
+		},
+		"@types/bluebird": {
+			"version": "3.5.36",
+			"resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.36.tgz",
+			"integrity": "sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==",
+			"dev": true
 		},
 		"@types/body-parser": {
 			"version": "1.19.1",
 			"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.1.tgz",
 			"integrity": "sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg==",
+			"dev": true,
 			"requires": {
 				"@types/connect": "*",
 				"@types/node": "*"
 			}
 		},
+		"@types/bson": {
+			"version": "4.0.5",
+			"resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.5.tgz",
+			"integrity": "sha512-vVLwMUqhYJSQ/WKcE60eFqcyuWse5fGH+NMAXHuKrUAPoryq3ATxk5o4bgYNtg5aOM4APVg7Hnb3ASqUYG0PKg==",
+			"dev": true,
+			"requires": {
+				"@types/node": "*"
+			}
+		},
 		"@types/connect": {
 			"version": "3.4.35",
 			"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
 			"integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
+			"dev": true,
 			"requires": {
 				"@types/node": "*"
 			}
@@ -1687,6 +2039,7 @@
 			"version": "4.17.13",
 			"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
 			"integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
+			"dev": true,
 			"requires": {
 				"@types/body-parser": "*",
 				"@types/express-serve-static-core": "^4.17.18",
@@ -1698,41 +2051,117 @@
 			"version": "4.17.24",
 			"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.24.tgz",
 			"integrity": "sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA==",
+			"dev": true,
 			"requires": {
 				"@types/node": "*",
 				"@types/qs": "*",
 				"@types/range-parser": "*"
 			}
 		},
+		"@types/i18next-node-fs-backend": {
+			"version": "2.1.1",
+			"resolved": "https://registry.npmjs.org/@types/i18next-node-fs-backend/-/i18next-node-fs-backend-2.1.1.tgz",
+			"integrity": "sha512-ESvH90OICQkKU3yuuRzF6YfHt5KACE55FOiUM59mMGnC+h03lHGdEYo3z3THbwS5FdMskLyIs2O7f6Oaz8P9sw==",
+			"dev": true,
+			"requires": {
+				"i18next": ">=17.0.11"
+			}
+		},
+		"@types/jsonwebtoken": {
+			"version": "8.5.4",
+			"resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.4.tgz",
+			"integrity": "sha512-4L8msWK31oXwdtC81RmRBAULd0ShnAHjBuKT9MRQpjP0piNrZdXyTRcKY9/UIfhGeKIT4PvF5amOOUbbT/9Wpg==",
+			"dev": true,
+			"requires": {
+				"@types/node": "*"
+			}
+		},
 		"@types/mime": {
 			"version": "1.3.2",
 			"resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
-			"integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw=="
+			"integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==",
+			"dev": true
+		},
+		"@types/mongodb": {
+			"version": "3.6.20",
+			"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.20.tgz",
+			"integrity": "sha512-WcdpPJCakFzcWWD9juKoZbRtQxKIMYF/JIAM4JrNHrMcnJL6/a2NWjXxW7fo9hxboxxkg+icff8d7+WIEvKgYQ==",
+			"dev": true,
+			"requires": {
+				"@types/bson": "*",
+				"@types/node": "*"
+			}
 		},
-		"@types/node": {
-			"version": "16.6.1",
-			"resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz",
-			"integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw=="
+		"@types/mongoose": {
+			"version": "5.10.5",
+			"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.10.5.tgz",
+			"integrity": "sha512-37QMIA954T3n+HSksSNLlxZsqF8fMJu5S4dyPBod6gRxGtsXlQ9jUtL8BE8Seimv99u79eLXI3bggoCnSQ/fxQ==",
+			"dev": true,
+			"requires": {
+				"@types/mongodb": "*",
+				"@types/node": "*"
+			}
 		},
-		"@types/node-os-utils": {
-			"version": "1.2.0",
-			"resolved": "https://registry.npmjs.org/@types/node-os-utils/-/node-os-utils-1.2.0.tgz",
-			"integrity": "sha512-sstDo2s8gQR/Qh2Bd6yNQ5xJv+D4ttyB9ZVjB3mBm3VkGl2RoqjV7fiw9mIHLbshHSRm2m8uf0XrIRQNWB/z6A=="
+		"@types/mongoose-autopopulate": {
+			"version": "0.10.2",
+			"resolved": "https://registry.npmjs.org/@types/mongoose-autopopulate/-/mongoose-autopopulate-0.10.2.tgz",
+			"integrity": "sha512-YSxSEhszXK9E+7VRLdpYjkXqcRXOPFtG0xZea9n7A+oaHhZ1lSVBm/WvK2Rr746NPrTm/k1tR6uezyG6kyinyg==",
+			"dev": true,
+			"requires": {
+				"@types/mongoose": "5.10.5"
+			}
+		},
+		"@types/mongoose-lean-virtuals": {
+			"version": "0.5.2",
+			"resolved": "https://registry.npmjs.org/@types/mongoose-lean-virtuals/-/mongoose-lean-virtuals-0.5.2.tgz",
+			"integrity": "sha512-TpAX2RkFXLtNjyciiYxdvYpVuCAv/g1alFTl4ErJWvSOA+DuNDNvfXSH3c8/DXC1ZBzO47TCwHaxI/PET4sqxQ==",
+			"dev": true,
+			"requires": {
+				"@types/mongoose": "5.10.5"
+			}
+		},
+		"@types/multer": {
+			"version": "1.4.7",
+			"resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.7.tgz",
+			"integrity": "sha512-/SNsDidUFCvqqcWDwxv2feww/yqhNeTRL5CVoL3jU4Goc4kKEL10T7Eye65ZqPNi4HRx8sAEX59pV1aEH7drNA==",
+			"dev": true,
+			"requires": {
+				"@types/express": "*"
+			}
+		},
+		"@types/node": {
+			"version": "14.17.9",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.9.tgz",
+			"integrity": "sha512-CMjgRNsks27IDwI785YMY0KLt3co/c0cQ5foxHYv/shC2w8oOnVwz5Ubq1QG5KzrcW+AXk6gzdnxIkDnTvzu3g==",
+			"dev": true
+		},
+		"@types/node-fetch": {
+			"version": "2.5.12",
+			"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
+			"integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
+			"dev": true,
+			"requires": {
+				"@types/node": "*",
+				"form-data": "^3.0.0"
+			}
 		},
 		"@types/qs": {
 			"version": "6.9.7",
 			"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
-			"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw=="
+			"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
+			"dev": true
 		},
 		"@types/range-parser": {
 			"version": "1.2.4",
 			"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
-			"integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw=="
+			"integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
+			"dev": true
 		},
 		"@types/serve-static": {
 			"version": "1.13.10",
 			"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz",
 			"integrity": "sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==",
+			"dev": true,
 			"requires": {
 				"@types/mime": "^1",
 				"@types/node": "*"
@@ -1743,6 +2172,39 @@
 			"resolved": "https://registry.npmjs.org/@types/tmp/-/tmp-0.2.1.tgz",
 			"integrity": "sha512-7cTXwKP/HLOPVgjg+YhBdQ7bMiobGMuoBmrGmqwIWJv8elC6t1DfVc/mn4fD9UE1IjhwmhaQ5pGVXkmXbH0rhg=="
 		},
+		"@types/uuid": {
+			"version": "8.3.1",
+			"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.1.tgz",
+			"integrity": "sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg==",
+			"dev": true
+		},
+		"@types/ws": {
+			"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": "*"
+			}
+		},
+		"@zerollup/ts-helpers": {
+			"version": "1.7.18",
+			"resolved": "https://registry.npmjs.org/@zerollup/ts-helpers/-/ts-helpers-1.7.18.tgz",
+			"integrity": "sha512-S9zN+y+i5yN/evfWquzSO3lubqPXIsPQf6p9OiPMpRxDx/0totPLF39XoRw48Dav5dSvbIE8D2eAPpXXJxvKwg==",
+			"dev": true,
+			"requires": {
+				"resolve": "^1.12.0"
+			}
+		},
+		"@zerollup/ts-transform-paths": {
+			"version": "1.7.18",
+			"resolved": "https://registry.npmjs.org/@zerollup/ts-transform-paths/-/ts-transform-paths-1.7.18.tgz",
+			"integrity": "sha512-YPVUxvWQVzRx1OBN0Pmkd58+R9FcfUJuwTaPUSoi5rKxuXMtxevTXdfi0w5mEaIH8b0DfL+wg0wFDHiJE+S2zA==",
+			"dev": true,
+			"requires": {
+				"@zerollup/ts-helpers": "^1.7.18"
+			}
+		},
 		"accepts": {
 			"version": "1.3.7",
 			"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
@@ -1793,6 +2255,12 @@
 				"tslib": "^2.1.0"
 			}
 		},
+		"asynckit": {
+			"version": "0.4.0",
+			"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+			"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+			"dev": true
+		},
 		"balanced-match": {
 			"version": "1.0.2",
 			"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -1867,6 +2335,15 @@
 			"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz",
 			"integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg=="
 		},
+		"combined-stream": {
+			"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"
+			}
+		},
 		"commondir": {
 			"version": "1.0.1",
 			"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
@@ -1913,6 +2390,12 @@
 				"ms": "2.0.0"
 			}
 		},
+		"delayed-stream": {
+			"version": "1.0.0",
+			"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+			"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+			"dev": true
+		},
 		"denque": {
 			"version": "1.5.0",
 			"resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz",
@@ -2034,6 +2517,17 @@
 				"path-exists": "^4.0.0"
 			}
 		},
+		"form-data": {
+			"version": "3.0.1",
+			"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
+			"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
+			"dev": true,
+			"requires": {
+				"asynckit": "^0.4.0",
+				"combined-stream": "^1.0.8",
+				"mime-types": "^2.1.12"
+			}
+		},
 		"forwarded": {
 			"version": "0.2.0",
 			"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@@ -2054,6 +2548,12 @@
 			"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
 			"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
 		},
+		"function-bind": {
+			"version": "1.1.1",
+			"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+			"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+			"dev": true
+		},
 		"get-port": {
 			"version": "5.1.1",
 			"resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz",
@@ -2072,6 +2572,15 @@
 				"path-is-absolute": "^1.0.0"
 			}
 		},
+		"has": {
+			"version": "1.0.3",
+			"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+			"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+			"dev": true,
+			"requires": {
+				"function-bind": "^1.1.1"
+			}
+		},
 		"http-errors": {
 			"version": "1.7.2",
 			"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
@@ -2108,6 +2617,15 @@
 				}
 			}
 		},
+		"i18next": {
+			"version": "20.4.0",
+			"resolved": "https://registry.npmjs.org/i18next/-/i18next-20.4.0.tgz",
+			"integrity": "sha512-89iWWJudmaHJwzIdJ/1eu98GtsJnwBhOUWwlAre70itPMuTE/NTPtgVeaS1CGaB8Q3XrYBGpEqlq4jsScDx9kg==",
+			"dev": true,
+			"requires": {
+				"@babel/runtime": "^7.12.0"
+			}
+		},
 		"iconv-lite": {
 			"version": "0.4.24",
 			"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -2140,6 +2658,15 @@
 			"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
 			"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
 		},
+		"is-core-module": {
+			"version": "2.5.0",
+			"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz",
+			"integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==",
+			"dev": true,
+			"requires": {
+				"has": "^1.0.3"
+			}
+		},
 		"isarray": {
 			"version": "1.0.0",
 			"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@@ -2393,6 +2920,12 @@
 			"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
 			"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
 		},
+		"path-parse": {
+			"version": "1.0.7",
+			"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+			"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+			"dev": true
+		},
 		"path-to-regexp": {
 			"version": "0.1.7",
 			"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
@@ -2460,11 +2993,27 @@
 				"util-deprecate": "~1.0.1"
 			}
 		},
+		"regenerator-runtime": {
+			"version": "0.13.9",
+			"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
+			"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==",
+			"dev": true
+		},
 		"require-at": {
 			"version": "1.0.6",
 			"resolved": "https://registry.npmjs.org/require-at/-/require-at-1.0.6.tgz",
 			"integrity": "sha512-7i1auJbMUrXEAZCOQ0VNJgmcT2VOKPRl2YGJwgpHpC9CE91Mv4/4UYIUm4chGJaI381ZDq1JUicFii64Hapd8g=="
 		},
+		"resolve": {
+			"version": "1.20.0",
+			"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
+			"integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
+			"dev": true,
+			"requires": {
+				"is-core-module": "^2.2.0",
+				"path-parse": "^1.0.6"
+			}
+		},
 		"rimraf": {
 			"version": "3.0.2",
 			"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -2634,7 +3183,8 @@
 		"typescript": {
 			"version": "4.3.5",
 			"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
-			"integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA=="
+			"integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
+			"dev": true
 		},
 		"unpipe": {
 			"version": "1.0.0",
diff --git a/bundle/package.json b/bundle/package.json
index dc96e573..d6a44f53 100644
--- a/bundle/package.json
+++ b/bundle/package.json
@@ -10,6 +10,7 @@
 		"build:cdn": "cd ../cdn/ && npm run build",
 		"build:gateway": "cd ../gateway/ && npm run build",
 		"start": "npm run build && node dist/start.js",
+		"bundle": "npm run build && node dist/startBundle.js",
 		"test": "echo \"Error: no test specified\" && exit 1"
 	},
 	"repository": {
@@ -29,15 +30,15 @@
 		"@types/express": "^4.17.9",
 		"@types/i18next-node-fs-backend": "^2.1.0",
 		"@types/jsonwebtoken": "^8.5.0",
-		"@types/multer": "^1.4.5",
-		"@types/node": "^14.17.9",
-		"@types/node-fetch": "^2.5.7",
-		"@zerollup/ts-transform-paths": "^1.7.18",
 		"@types/mongodb": "^3.6.9",
 		"@types/mongoose-autopopulate": "^0.10.1",
 		"@types/mongoose-lean-virtuals": "^0.5.1",
+		"@types/multer": "^1.4.5",
+		"@types/node": "^14.17.9",
+		"@types/node-fetch": "^2.5.7",
 		"@types/uuid": "^8.3.0",
 		"@types/ws": "^7.4.0",
+		"@zerollup/ts-transform-paths": "^1.7.18",
 		"typescript": "^4.3.5"
 	},
 	"dependencies": {
@@ -48,6 +49,6 @@
 		"async-exit-hook": "^2.0.1",
 		"express": "^4.17.1",
 		"mongodb-memory-server": "^7.3.6",
-		"node-os-utils": "^1.3.5",
+		"node-os-utils": "^1.3.5"
 	}
 }
diff --git a/bundle/src/BundledServer.ts b/bundle/src/BundledServer.ts
deleted file mode 100644
index 6951c1c4..00000000
--- a/bundle/src/BundledServer.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-process.on("unhandledRejection", console.error);
-process.on("uncaughtException", console.error);
-
-import http from "http";
-import { FosscordServer as APIServer } from "@fosscord/api";
-import { Server as GatewayServer } from "@fosscord/gateway";
-import { CDNServer } from "@fosscord/cdn/";
-import express from "express";
-import { Config } from "../../util/dist";
-
-const app = express();
-const server = http.createServer();
-const port = Number(process.env.PORT) || 8080;
-const production = true;
-server.on("request", app);
-
-// @ts-ignore
-const api = new APIServer({ server, port, production, app });
-// @ts-ignore
-const cdn = new CDNServer({ server, port, production, app });
-// @ts-ignore
-const gateway = new GatewayServer({ server, port, production });
-
-async function main() {
-	await Config.set({
-		cdn: {
-			endpointClient: "${location.host}",
-			endpoint: `http://localhost:${port}`,
-		},
-		gateway: {
-			endpointClient: '${location.protocol === "https:" ? "wss://" : "ws://"}${location.host}',
-			endpoint: `ws://localhost:${port}`,
-		},
-	});
-
-	await api.start();
-	await cdn.start();
-	await gateway.start();
-}
-
-main().catch(console.error);
diff --git a/bundle/src/Database.ts b/bundle/src/Database.ts
index 0efd2471..7351290a 100644
--- a/bundle/src/Database.ts
+++ b/bundle/src/Database.ts
@@ -2,7 +2,7 @@ import fs from "fs";
 import { MongoMemoryServer } from "mongodb-memory-server";
 import path from "path";
 import exitHook from "async-exit-hook";
-console.log(process.arch, process.platform);
+
 if (process.arch == "ia32") {
 	Object.defineProperty(process, "arch", {
 		value: "x64",
diff --git a/bundle/src/Server.ts b/bundle/src/Server.ts
index 42a3f3c3..0ef7a8a3 100644
--- a/bundle/src/Server.ts
+++ b/bundle/src/Server.ts
@@ -1,27 +1,35 @@
 process.on("unhandledRejection", console.error);
 process.on("uncaughtException", console.error);
 
+import http from "http";
 import { FosscordServer as APIServer } from "@fosscord/api";
 import { Server as GatewayServer } from "@fosscord/gateway";
 import { CDNServer } from "@fosscord/cdn/";
+import express from "express";
 import { Config } from "../../util/dist";
 
-const production = true;
+const app = express();
+const server = http.createServer();
+const port = Number(process.env.PORT) || 8080;
+const production = false;
+server.on("request", app);
 
-const api = new APIServer({ production, port: Number(process.env.API_PORT) || 3001 });
-const gateway = new GatewayServer({ port: Number(process.env.GATEWAY_PORT) || 3002 });
-const cdn = new CDNServer({ production, port: Number(process.env.CDN_PORT) || 3003 });
+// @ts-ignore
+const api = new APIServer({ server, port, production, app });
+// @ts-ignore
+const cdn = new CDNServer({ server, port, production, app });
+// @ts-ignore
+const gateway = new GatewayServer({ server, port, production });
 
 async function main() {
 	await Config.set({
 		cdn: {
 			endpointClient: "${location.host}",
-			endpoint: `http://localhost:${cdn.options.port}`,
+			endpoint: `http://localhost:${port}`,
 		},
 		gateway: {
-			endpointClient:
-				'${location.protocol === "https:" ? "wss://" : "ws://"}${location.hostname}:' + gateway.port,
-			endpoint: `ws://localhost:${gateway.port}`,
+			endpointClient: '${location.protocol === "https:" ? "wss://" : "ws://"}${location.host}',
+			endpoint: `ws://localhost:${port}`,
 		},
 	});
 
diff --git a/bundle/src/stats.ts b/bundle/src/stats.ts
index c621ed75..0a10a855 100644
--- a/bundle/src/stats.ts
+++ b/bundle/src/stats.ts
@@ -18,5 +18,5 @@ export function initStats() {
 				process.memoryUsage().rss / 1024 / 1024
 			)}mb/${memory.totalMemMb.toFixed(0)}mb`
 		);
-	}, 1000 * 60);
+	}, 1000 * 30);
 }