summary refs log tree commit diff
path: root/src/models/Application.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/Application.ts')
-rw-r--r--src/models/Application.ts44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/models/Application.ts b/src/models/Application.ts
new file mode 100644

index 00000000..ea443dc9 --- /dev/null +++ b/src/models/Application.ts
@@ -0,0 +1,44 @@ +export interface ApplicationCommand { + id: bigint; + application_id: bigint; + name: string; + description: string; + options?: ApplicationCommandOption[]; +} + +export interface ApplicationCommandOption { + type: ApplicationCommandOptionType; + name: string; + description: string; + required?: boolean; + choices?: ApplicationCommandOptionChoice[]; + options?: ApplicationCommandOption[]; +} + +export interface ApplicationCommandOptionChoice { + name: string; + value: string | number; +} + +export enum ApplicationCommandOptionType { + SUB_COMMAND = 1, + SUB_COMMAND_GROUP = 2, + STRING = 3, + INTEGER = 4, + BOOLEAN = 5, + USER = 6, + CHANNEL = 7, + ROLE = 8, +} + +export interface ApplicationCommandInteractionData { + id: bigint; + name: string; + options?: ApplicationCommandInteractionDataOption[]; +} + +export interface ApplicationCommandInteractionDataOption { + name: string; + value?: any; + options?: ApplicationCommandInteractionDataOption[]; +}