Mistake
oh no
This commit is contained in:
parent
8734b87ea9
commit
69bc495e81
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord.js-selfbot-v13",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.3",
|
||||
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
|
||||
"main": "./src/index.js",
|
||||
"types": "./typings/index.d.ts",
|
||||
|
@ -486,7 +486,7 @@ class ApplicationCommand extends Base {
|
||||
);
|
||||
}
|
||||
if (!subCommandCheck && !this?.options[i]) continue;
|
||||
if (subCommandCheck && subCommand && !subCommand?.options[i]) continue;
|
||||
if (subCommandCheck && subCommand?.options && !subCommand?.options[i]) continue;
|
||||
if (!subCommandCheck) {
|
||||
// Check value is invalid
|
||||
let choice;
|
||||
@ -515,6 +515,7 @@ class ApplicationCommand extends Base {
|
||||
// Check value is invalid
|
||||
let choice;
|
||||
if (
|
||||
subCommand?.options &&
|
||||
subCommand.options[i].choices &&
|
||||
subCommand.options[i].choices.length > 0
|
||||
) {
|
||||
@ -546,7 +547,11 @@ class ApplicationCommand extends Base {
|
||||
}
|
||||
if (!subCommandCheck && this.options[i]?.required)
|
||||
throw new Error('Value required missing');
|
||||
if (subCommandCheck && subCommand?.options[i-1]?.required)
|
||||
if (
|
||||
subCommandCheck &&
|
||||
subCommand?.options &&
|
||||
subCommand?.options[i - 1]?.required
|
||||
)
|
||||
throw new Error('Value required missing');
|
||||
await this.client.api.interactions.post({
|
||||
body: {
|
||||
|
Loading…
Reference in New Issue
Block a user