diff --git a/index.js b/index.js index c6c6c9c..0bfcf48 100755 --- a/index.js +++ b/index.js @@ -564,13 +564,13 @@ client.on("interactionCreate", async interaction => { training(interaction.options.get("subject") ? interaction.options.get("subject").value : null, interaction); break; case "rounds": - rounds(interaction.options.first().name, interaction); + rounds(interaction.options.getSubcommand(), interaction); break; case "top": showLeaderboard(interaction); break; case "about": - about(interaction.options.first().name, interaction); + about(interaction.options.getSubcommand(), interaction); break; } }) diff --git a/package-lock.json b/package-lock.json index 2a5ebb2..9573558 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache 2.0", "dependencies": { "axios": "^0.21.1", - "discord.js": "github:discordjs/discord.js", + "discord.js": "^13.2.0", "dotenv": "^8.2.0", "eslint": "^7.21.0", "fs": "^0.0.1-security", @@ -240,15 +240,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.9.tgz", "integrity": "sha512-H9ReOt+yqIJPCutkTYjFjlyK6WEMQYT9hLZMlWtOjFQY2ItppsWZ6RJf8Aw+jz5qTYceuHvFgPIaKOHtLAEWBw==" }, - "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==", - "dependencies": { - "@types/node": "*", - "form-data": "^3.0.0" - } - }, "node_modules/@types/ws": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz", @@ -505,15 +496,14 @@ } }, "node_modules/discord.js": { - "version": "13.3.0-dev", - "resolved": "git+ssh://git@github.com/discordjs/discord.js.git#c44ea50157cecc9495df44a952fc0400a6f56e26", - "license": "Apache-2.0", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.2.0.tgz", + "integrity": "sha512-nyxUvL8wuQG38zx13wUMkpcA8koFszyiXdkSLwwM9opKW2LC2H5gD0cTZxImeJ6GtEnKPWT8xBiE8lLBmbNIhw==", "dependencies": { "@discordjs/builders": "^0.6.0", "@discordjs/collection": "^0.2.1", "@discordjs/form-data": "^3.0.1", "@sapphire/async-queue": "^1.1.5", - "@types/node-fetch": "^2.5.12", "@types/ws": "^8.2.0", "discord-api-types": "^0.23.1", "node-fetch": "^2.6.1", @@ -831,19 +821,6 @@ } } }, - "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fs": { "version": "0.0.1-security", "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", @@ -1978,15 +1955,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.9.tgz", "integrity": "sha512-H9ReOt+yqIJPCutkTYjFjlyK6WEMQYT9hLZMlWtOjFQY2ItppsWZ6RJf8Aw+jz5qTYceuHvFgPIaKOHtLAEWBw==" }, - "@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==", - "requires": { - "@types/node": "*", - "form-data": "^3.0.0" - } - }, "@types/ws": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz", @@ -2178,14 +2146,14 @@ "integrity": "sha512-igWmn+45mzXRWNEPU25I/pr8MwxHb767wAr51oy3VRLRcTlp5ADBbrBR0lq3SA1Rfw3MtM4TQu1xo3kxscfVdQ==" }, "discord.js": { - "version": "git+ssh://git@github.com/discordjs/discord.js.git#c44ea50157cecc9495df44a952fc0400a6f56e26", - "from": "discord.js@github:discordjs/discord.js", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.2.0.tgz", + "integrity": "sha512-nyxUvL8wuQG38zx13wUMkpcA8koFszyiXdkSLwwM9opKW2LC2H5gD0cTZxImeJ6GtEnKPWT8xBiE8lLBmbNIhw==", "requires": { "@discordjs/builders": "^0.6.0", "@discordjs/collection": "^0.2.1", "@discordjs/form-data": "^3.0.1", "@sapphire/async-queue": "^1.1.5", - "@types/node-fetch": "^2.5.12", "@types/ws": "^8.2.0", "discord-api-types": "^0.23.1", "node-fetch": "^2.6.1", @@ -2411,16 +2379,6 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==" }, - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, "fs": { "version": "0.0.1-security", "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", diff --git a/package.json b/package.json index da4b3a1..8d0a4af 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "dependencies": { "axios": "^0.21.1", - "discord.js": "github:discordjs/discord.js", + "discord.js": "^13.2.0", "dotenv": "^8.2.0", "eslint": "^7.21.0", "fs": "^0.0.1-security",