summary refs log tree commit diff
path: root/src/models/Application.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-11 20:44:12 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-11 20:44:12 +0100
commit1f7ebe256e00583bf0888d3f9e32ea1b8ef1b237 (patch)
tree5906b6dcc83593a8dae7d88e62fa62680c4dcda9 /src/models/Application.ts
parent:sparkles: Event model (diff)
downloadserver-1f7ebe256e00583bf0888d3f9e32ea1b8ef1b237.tar.xz
:sparkles: updated other models
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[]; +}