refactor(options.ts): move options type declarations to types folder

This commit is contained in:
Jacob Nguyen
2022-02-19 13:14:54 -06:00
parent 651009c9ed
commit c8bf7aeb92

26
src/types/options.ts Normal file
View File

@@ -0,0 +1,26 @@
import type {
ApplicationCommandAutocompleteOption,
ApplicationCommandChannelOptionData,
ApplicationCommandChoicesOption,
ApplicationCommandNonOptionsData,
ApplicationCommandNumericOptionData,
ApplicationCommandSubCommandData,
ApplicationCommandSubGroupData
} from 'discord.js';
type BaseOption = { name : string, description : string, required : false };
export interface OptionData {
SUB_COMMAND: ApplicationCommandSubCommandData
SUB_COMMAND_GROUP: ApplicationCommandSubGroupData
NONE: ApplicationCommandNonOptionsData
CHANNEL: ApplicationCommandChannelOptionData
CHOICE: ApplicationCommandChoicesOption
AUTO: ApplicationCommandAutocompleteOption
NUMBER: ApplicationCommandNumericOptionData
INTEGER: ApplicationCommandNumericOptionData
USER : { type: "USER" } & BaseOption
MENTIONABLE: { type : "MENTIONABLE" } & BaseOption
ROLE : { type: "ROLE" } & BaseOption
BOOLEAN : { type: "BOOLEAN" } & BaseOption
}