You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On typescript, if you use chatInputCommandInteraction.options.getSubcommand(true) you expect to receive a string, otherwise you expect to receive a string or null. But it is defined as follows:
public getSubcommand(required?: true): string;
public getSubcommand(required: boolean): string | null;
it should look like this (as the other getUser/getChannel/etc methods do):
public getSubcommand(required: true): string;
public getSubcommand(required?: boolean): string | null;
Code sample
No response
Versions
Discordjs 14.16.3
Node v18.17.1
Typescript 9.6.7
Issue priority
Low (slightly annoying)
Which partials do you have configured?
Not applicable
Which gateway intents are you subscribing to?
Not applicable
I have tested this issue on a development release
No response
The text was updated successfully, but these errors were encountered:
On typescript, if you use chatInputCommandInteraction.options.getSubcommand(true) you expect to receive a string, otherwise you expect to receive a string or null. But it is defined as follows:
public getSubcommand(required?: true): string;
public getSubcommand(required: boolean): string | null;
This is correct. If the parameter is missing or is true, it will return a string, otherwise string | null.
it should look like this (as the other getUser/getChannel/etc methods do):
public getSubcommand(required: true): string;
public getSubcommand(required?: boolean): string | null;
This does not reflect JavaScript, so this would be incorrect.
Which package is this bug report for?
discord.js
Issue description
On typescript, if you use chatInputCommandInteraction.options.getSubcommand(true) you expect to receive a string, otherwise you expect to receive a string or null. But it is defined as follows:
public getSubcommand(required?: true): string;
public getSubcommand(required: boolean): string | null;
it should look like this (as the other getUser/getChannel/etc methods do):
public getSubcommand(required: true): string;
public getSubcommand(required?: boolean): string | null;
Code sample
No response
Versions
Discordjs 14.16.3
Node v18.17.1
Typescript 9.6.7
Issue priority
Low (slightly annoying)
Which partials do you have configured?
Not applicable
Which gateway intents are you subscribing to?
Not applicable
I have tested this issue on a development release
No response
The text was updated successfully, but these errors were encountered: