feat(ApplicationCommandOptionType): add Number (10) (#153)

This commit is contained in:
Advaith
2021-07-26 12:12:54 -07:00
committed by GitHub
parent d338409410
commit 6f15e537df
4 changed files with 44 additions and 4 deletions

View File

@@ -79,7 +79,10 @@ export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicat
* but they can have a `choices` one
*/
export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
type: ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer;
type:
| ApplicationCommandOptionType.String
| ApplicationCommandOptionType.Integer
| ApplicationCommandOptionType.Number;
choices?: APIApplicationCommandOptionChoice[];
}
@@ -96,6 +99,7 @@ export enum ApplicationCommandOptionType {
Channel,
Role,
Mentionable,
Number,
}
/**
@@ -162,6 +166,7 @@ export type APIApplicationCommandInteractionDataOptionWithValues =
| ApplicationCommandInteractionDataOptionUser
| ApplicationCommandInteractionDataOptionMentionable
| ApplicationCommandInteractionDataOptionInteger
| ApplicationCommandInteractionDataOptionNumber
| ApplicationCommandInteractionDataOptionBoolean;
export type ApplicationCommandInteractionDataOptionString = InteractionDataOptionBase<
@@ -194,6 +199,11 @@ export type ApplicationCommandInteractionDataOptionInteger = InteractionDataOpti
number
>;
export type ApplicationCommandInteractionDataOptionNumber = InteractionDataOptionBase<
ApplicationCommandOptionType.Number,
number
>;
export type ApplicationCommandInteractionDataOptionBoolean = InteractionDataOptionBase<
ApplicationCommandOptionType.Boolean,
boolean

View File

@@ -79,7 +79,10 @@ export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicat
* but they can have a `choices` one
*/
export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
type: ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer;
type:
| ApplicationCommandOptionType.String
| ApplicationCommandOptionType.Integer
| ApplicationCommandOptionType.Number;
choices?: APIApplicationCommandOptionChoice[];
}
@@ -96,6 +99,7 @@ export enum ApplicationCommandOptionType {
Channel,
Role,
Mentionable,
Number,
}
/**
@@ -162,6 +166,7 @@ export type APIApplicationCommandInteractionDataOptionWithValues =
| ApplicationCommandInteractionDataOptionUser
| ApplicationCommandInteractionDataOptionMentionable
| ApplicationCommandInteractionDataOptionInteger
| ApplicationCommandInteractionDataOptionNumber
| ApplicationCommandInteractionDataOptionBoolean;
export type ApplicationCommandInteractionDataOptionString = InteractionDataOptionBase<
@@ -194,6 +199,11 @@ export type ApplicationCommandInteractionDataOptionInteger = InteractionDataOpti
number
>;
export type ApplicationCommandInteractionDataOptionNumber = InteractionDataOptionBase<
ApplicationCommandOptionType.Number,
number
>;
export type ApplicationCommandInteractionDataOptionBoolean = InteractionDataOptionBase<
ApplicationCommandOptionType.Boolean,
boolean

View File

@@ -79,7 +79,10 @@ export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicat
* but they can have a `choices` one
*/
export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
type: ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer;
type:
| ApplicationCommandOptionType.String
| ApplicationCommandOptionType.Integer
| ApplicationCommandOptionType.Number;
choices?: APIApplicationCommandOptionChoice[];
}
@@ -96,6 +99,7 @@ export const enum ApplicationCommandOptionType {
Channel,
Role,
Mentionable,
Number,
}
/**
@@ -162,6 +166,7 @@ export type APIApplicationCommandInteractionDataOptionWithValues =
| ApplicationCommandInteractionDataOptionUser
| ApplicationCommandInteractionDataOptionMentionable
| ApplicationCommandInteractionDataOptionInteger
| ApplicationCommandInteractionDataOptionNumber
| ApplicationCommandInteractionDataOptionBoolean;
export type ApplicationCommandInteractionDataOptionString = InteractionDataOptionBase<
@@ -194,6 +199,11 @@ export type ApplicationCommandInteractionDataOptionInteger = InteractionDataOpti
number
>;
export type ApplicationCommandInteractionDataOptionNumber = InteractionDataOptionBase<
ApplicationCommandOptionType.Number,
number
>;
export type ApplicationCommandInteractionDataOptionBoolean = InteractionDataOptionBase<
ApplicationCommandOptionType.Boolean,
boolean

View File

@@ -79,7 +79,10 @@ export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicat
* but they can have a `choices` one
*/
export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
type: ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer;
type:
| ApplicationCommandOptionType.String
| ApplicationCommandOptionType.Integer
| ApplicationCommandOptionType.Number;
choices?: APIApplicationCommandOptionChoice[];
}
@@ -96,6 +99,7 @@ export const enum ApplicationCommandOptionType {
Channel,
Role,
Mentionable,
Number,
}
/**
@@ -162,6 +166,7 @@ export type APIApplicationCommandInteractionDataOptionWithValues =
| ApplicationCommandInteractionDataOptionUser
| ApplicationCommandInteractionDataOptionMentionable
| ApplicationCommandInteractionDataOptionInteger
| ApplicationCommandInteractionDataOptionNumber
| ApplicationCommandInteractionDataOptionBoolean;
export type ApplicationCommandInteractionDataOptionString = InteractionDataOptionBase<
@@ -194,6 +199,11 @@ export type ApplicationCommandInteractionDataOptionInteger = InteractionDataOpti
number
>;
export type ApplicationCommandInteractionDataOptionNumber = InteractionDataOptionBase<
ApplicationCommandOptionType.Number,
number
>;
export type ApplicationCommandInteractionDataOptionBoolean = InteractionDataOptionBase<
ApplicationCommandOptionType.Boolean,
boolean