Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Snazzah/slash-create
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Nov 14, 2021
2 parents 5dbb8cc + bc6a02e commit 4ab722f
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 117 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"url": "https://github.com/sponsors/Snazzah"
},
"dependencies": {
"@discordjs/collection": "^0.2.1",
"@discordjs/collection": "^0.3.2",
"eventemitter3": "^4.0.7",
"lodash.isequal": "^4.5.0",
"lodash.uniq": "^4.5.0",
Expand Down
22 changes: 21 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,38 @@ export interface ApplicationCommandOptionAutocompletable extends Omit<Applicatio
autocomplete?: boolean;
}

/**
* @private
*/
export interface ApplicationCommandOptionChannel extends Omit<ApplicationCommandOptionBase, 'type'> {
/** The type of option this one is. */
type: CommandOptionType.CHANNEL;
/** An array of channel types this option can be. */
channel_types?: ChannelType[];
}

/**
* @private
*/
export interface ApplicationCommandOptionLimitedNumber extends Omit<ApplicationCommandOptionBase, 'type'> {
/** The type of option this one is. */
type: CommandOptionType.INTEGER | CommandOptionType.NUMBER;
/** Whether this option can be autocompleted. */
autocomplete?: boolean;
/** The minimum value permitted. */
min_value?: number;
/** The maximum value permitted. */
max_value?: number;
}

/** An option in an application command. */
export type ApplicationCommandOption =
| ApplicationCommandOptionBase
| ApplicationCommandOptionSubCommand
| ApplicationCommandOptionArgument
| ApplicationCommandOptionAutocompletable
| ApplicationCommandOptionChannel;
| ApplicationCommandOptionChannel
| ApplicationCommandOptionLimitedNumber;

/** A choice for a user to pick from. */
export interface ApplicationCommandOptionChoice {
Expand Down Expand Up @@ -525,6 +543,8 @@ export interface CommandIntegerOption {
type?: CommandOptionType.INTEGER;
value: number;
focused?: boolean;
min_value?: number;
max_value?: number;
}

/** @private */
Expand Down
Loading

0 comments on commit 4ab722f

Please sign in to comment.