Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(types): add option type number #86

Merged
merged 1 commit into from
Jul 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export enum CommandOptionType {
/** A role, this would return the role's ID in the interaction. */
ROLE = 8,
/** Anything mentionable, returning the ID of the object. */
MENTIONABLE = 9
MENTIONABLE = 9,
/** A number, including decimal numbers. */
NUMBER = 10
}

/**
Expand Down Expand Up @@ -138,7 +140,7 @@ export interface ApplicationCommandOptionSubCommand extends Omit<ApplicationComm
*/
export interface ApplicationCommandOptionArgument extends Omit<ApplicationCommandOptionBase, 'type'> {
/** The type of option this one is. */
type: CommandOptionType.STRING | CommandOptionType.INTEGER;
type: CommandOptionType.STRING | CommandOptionType.INTEGER | CommandOptionType.NUMBER;
/** The choices of the option. If set, these are the only values a user can pick from. */
choices?: ApplicationCommandOptionChoice[];
}
Expand Down