Skip to content

Commit

Permalink
chore(ApplicationCommandOptionType): casing changes for subcommands (#…
Browse files Browse the repository at this point in the history
…175)

BREAKING CHANGE: This renames `SubCommand` to `Subcommand`, and `SubCommandGroup` to `SubcommandGroup`
  • Loading branch information
vladfrangu authored Jul 31, 2021
1 parent b75b05f commit f93b6be
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions deno/payloads/v8/_interactions/slashCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export type APIApplicationCommandOption =
* If the option is a `SUB_COMMAND` or `SUB_COMMAND_GROUP` type, this nested options will be the parameters
*/
export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
type: ApplicationCommandOptionType.SubCommand | ApplicationCommandOptionType.SubCommandGroup;
type: ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup;
options?: APIApplicationCommandOption[];
}

Expand All @@ -90,8 +90,8 @@ export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicatio
* https://discord.com/developers/docs/interactions/slash-commands#application-command-object-application-command-option-type
*/
export enum ApplicationCommandOptionType {
SubCommand = 1,
SubCommandGroup,
Subcommand = 1,
SubcommandGroup,
String,
Integer,
Boolean,
Expand Down Expand Up @@ -149,13 +149,13 @@ export type APIApplicationCommandInteractionDataOption =

export interface ApplicationCommandInteractionDataOptionSubCommand {
name: string;
type: ApplicationCommandOptionType.SubCommand;
type: ApplicationCommandOptionType.Subcommand;
options: APIApplicationCommandInteractionDataOptionWithValues[];
}

export interface ApplicationCommandInteractionDataOptionSubCommandGroup {
name: string;
type: ApplicationCommandOptionType.SubCommandGroup;
type: ApplicationCommandOptionType.SubcommandGroup;
options: ApplicationCommandInteractionDataOptionSubCommand[];
}

Expand Down
10 changes: 5 additions & 5 deletions deno/payloads/v9/_interactions/slashCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export type APIApplicationCommandOption =
* If the option is a `SUB_COMMAND` or `SUB_COMMAND_GROUP` type, this nested options will be the parameters
*/
export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
type: ApplicationCommandOptionType.SubCommand | ApplicationCommandOptionType.SubCommandGroup;
type: ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup;
options?: APIApplicationCommandOption[];
}

Expand All @@ -90,8 +90,8 @@ export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicatio
* https://discord.com/developers/docs/interactions/slash-commands#application-command-object-application-command-option-type
*/
export enum ApplicationCommandOptionType {
SubCommand = 1,
SubCommandGroup,
Subcommand = 1,
SubcommandGroup,
String,
Integer,
Boolean,
Expand Down Expand Up @@ -149,13 +149,13 @@ export type APIApplicationCommandInteractionDataOption =

export interface ApplicationCommandInteractionDataOptionSubCommand {
name: string;
type: ApplicationCommandOptionType.SubCommand;
type: ApplicationCommandOptionType.Subcommand;
options: APIApplicationCommandInteractionDataOptionWithValues[];
}

export interface ApplicationCommandInteractionDataOptionSubCommandGroup {
name: string;
type: ApplicationCommandOptionType.SubCommandGroup;
type: ApplicationCommandOptionType.SubcommandGroup;
options: ApplicationCommandInteractionDataOptionSubCommand[];
}

Expand Down
10 changes: 5 additions & 5 deletions payloads/v8/_interactions/slashCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export type APIApplicationCommandOption =
* If the option is a `SUB_COMMAND` or `SUB_COMMAND_GROUP` type, this nested options will be the parameters
*/
export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
type: ApplicationCommandOptionType.SubCommand | ApplicationCommandOptionType.SubCommandGroup;
type: ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup;
options?: APIApplicationCommandOption[];
}

Expand All @@ -90,8 +90,8 @@ export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicatio
* https://discord.com/developers/docs/interactions/slash-commands#application-command-object-application-command-option-type
*/
export const enum ApplicationCommandOptionType {
SubCommand = 1,
SubCommandGroup,
Subcommand = 1,
SubcommandGroup,
String,
Integer,
Boolean,
Expand Down Expand Up @@ -149,13 +149,13 @@ export type APIApplicationCommandInteractionDataOption =

export interface ApplicationCommandInteractionDataOptionSubCommand {
name: string;
type: ApplicationCommandOptionType.SubCommand;
type: ApplicationCommandOptionType.Subcommand;
options: APIApplicationCommandInteractionDataOptionWithValues[];
}

export interface ApplicationCommandInteractionDataOptionSubCommandGroup {
name: string;
type: ApplicationCommandOptionType.SubCommandGroup;
type: ApplicationCommandOptionType.SubcommandGroup;
options: ApplicationCommandInteractionDataOptionSubCommand[];
}

Expand Down
10 changes: 5 additions & 5 deletions payloads/v9/_interactions/slashCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export type APIApplicationCommandOption =
* If the option is a `SUB_COMMAND` or `SUB_COMMAND_GROUP` type, this nested options will be the parameters
*/
export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
type: ApplicationCommandOptionType.SubCommand | ApplicationCommandOptionType.SubCommandGroup;
type: ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup;
options?: APIApplicationCommandOption[];
}

Expand All @@ -90,8 +90,8 @@ export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicatio
* https://discord.com/developers/docs/interactions/slash-commands#application-command-object-application-command-option-type
*/
export const enum ApplicationCommandOptionType {
SubCommand = 1,
SubCommandGroup,
Subcommand = 1,
SubcommandGroup,
String,
Integer,
Boolean,
Expand Down Expand Up @@ -149,13 +149,13 @@ export type APIApplicationCommandInteractionDataOption =

export interface ApplicationCommandInteractionDataOptionSubCommand {
name: string;
type: ApplicationCommandOptionType.SubCommand;
type: ApplicationCommandOptionType.Subcommand;
options: APIApplicationCommandInteractionDataOptionWithValues[];
}

export interface ApplicationCommandInteractionDataOptionSubCommandGroup {
name: string;
type: ApplicationCommandOptionType.SubCommandGroup;
type: ApplicationCommandOptionType.SubcommandGroup;
options: ApplicationCommandInteractionDataOptionSubCommand[];
}

Expand Down

0 comments on commit f93b6be

Please sign in to comment.