Browse Source

Attempt to fix interaction option subcommand selection

pull/18/head
Abheek Dhawan 3 years ago
parent
commit
75db00b51c
  1. 4
      index.js
  2. 56
      package-lock.json
  3. 2
      package.json

4
index.js

@ -564,13 +564,13 @@ client.on("interactionCreate", async interaction => {
training(interaction.options.get("subject") ? interaction.options.get("subject").value : null, interaction); training(interaction.options.get("subject") ? interaction.options.get("subject").value : null, interaction);
break; break;
case "rounds": case "rounds":
rounds(interaction.options.first().name, interaction); rounds(interaction.options.getSubcommand(), interaction);
break; break;
case "top": case "top":
showLeaderboard(interaction); showLeaderboard(interaction);
break; break;
case "about": case "about":
about(interaction.options.first().name, interaction); about(interaction.options.getSubcommand(), interaction);
break; break;
} }
}) })

56
package-lock.json

@ -10,7 +10,7 @@
"license": "Apache 2.0", "license": "Apache 2.0",
"dependencies": { "dependencies": {
"axios": "^0.21.1", "axios": "^0.21.1",
"discord.js": "github:discordjs/discord.js", "discord.js": "^13.2.0",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"eslint": "^7.21.0", "eslint": "^7.21.0",
"fs": "^0.0.1-security", "fs": "^0.0.1-security",
@ -240,15 +240,6 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.9.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.9.tgz",
"integrity": "sha512-H9ReOt+yqIJPCutkTYjFjlyK6WEMQYT9hLZMlWtOjFQY2ItppsWZ6RJf8Aw+jz5qTYceuHvFgPIaKOHtLAEWBw==" "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": { "node_modules/@types/ws": {
"version": "8.2.0", "version": "8.2.0",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz",
@ -505,15 +496,14 @@
} }
}, },
"node_modules/discord.js": { "node_modules/discord.js": {
"version": "13.3.0-dev", "version": "13.2.0",
"resolved": "git+ssh://git@github.com/discordjs/discord.js.git#c44ea50157cecc9495df44a952fc0400a6f56e26", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.2.0.tgz",
"license": "Apache-2.0", "integrity": "sha512-nyxUvL8wuQG38zx13wUMkpcA8koFszyiXdkSLwwM9opKW2LC2H5gD0cTZxImeJ6GtEnKPWT8xBiE8lLBmbNIhw==",
"dependencies": { "dependencies": {
"@discordjs/builders": "^0.6.0", "@discordjs/builders": "^0.6.0",
"@discordjs/collection": "^0.2.1", "@discordjs/collection": "^0.2.1",
"@discordjs/form-data": "^3.0.1", "@discordjs/form-data": "^3.0.1",
"@sapphire/async-queue": "^1.1.5", "@sapphire/async-queue": "^1.1.5",
"@types/node-fetch": "^2.5.12",
"@types/ws": "^8.2.0", "@types/ws": "^8.2.0",
"discord-api-types": "^0.23.1", "discord-api-types": "^0.23.1",
"node-fetch": "^2.6.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": { "node_modules/fs": {
"version": "0.0.1-security", "version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", "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", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.9.tgz",
"integrity": "sha512-H9ReOt+yqIJPCutkTYjFjlyK6WEMQYT9hLZMlWtOjFQY2ItppsWZ6RJf8Aw+jz5qTYceuHvFgPIaKOHtLAEWBw==" "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": { "@types/ws": {
"version": "8.2.0", "version": "8.2.0",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz",
@ -2178,14 +2146,14 @@
"integrity": "sha512-igWmn+45mzXRWNEPU25I/pr8MwxHb767wAr51oy3VRLRcTlp5ADBbrBR0lq3SA1Rfw3MtM4TQu1xo3kxscfVdQ==" "integrity": "sha512-igWmn+45mzXRWNEPU25I/pr8MwxHb767wAr51oy3VRLRcTlp5ADBbrBR0lq3SA1Rfw3MtM4TQu1xo3kxscfVdQ=="
}, },
"discord.js": { "discord.js": {
"version": "git+ssh://git@github.com/discordjs/discord.js.git#c44ea50157cecc9495df44a952fc0400a6f56e26", "version": "13.2.0",
"from": "discord.js@github:discordjs/discord.js", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.2.0.tgz",
"integrity": "sha512-nyxUvL8wuQG38zx13wUMkpcA8koFszyiXdkSLwwM9opKW2LC2H5gD0cTZxImeJ6GtEnKPWT8xBiE8lLBmbNIhw==",
"requires": { "requires": {
"@discordjs/builders": "^0.6.0", "@discordjs/builders": "^0.6.0",
"@discordjs/collection": "^0.2.1", "@discordjs/collection": "^0.2.1",
"@discordjs/form-data": "^3.0.1", "@discordjs/form-data": "^3.0.1",
"@sapphire/async-queue": "^1.1.5", "@sapphire/async-queue": "^1.1.5",
"@types/node-fetch": "^2.5.12",
"@types/ws": "^8.2.0", "@types/ws": "^8.2.0",
"discord-api-types": "^0.23.1", "discord-api-types": "^0.23.1",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
@ -2411,16 +2379,6 @@
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz",
"integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==" "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": { "fs": {
"version": "0.0.1-security", "version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",

2
package.json

@ -1,7 +1,7 @@
{ {
"dependencies": { "dependencies": {
"axios": "^0.21.1", "axios": "^0.21.1",
"discord.js": "github:discordjs/discord.js", "discord.js": "^13.2.0",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"eslint": "^7.21.0", "eslint": "^7.21.0",
"fs": "^0.0.1-security", "fs": "^0.0.1-security",

Loading…
Cancel
Save