From 1938e4c12fe2254a6b57c329041b702bae941b91 Mon Sep 17 00:00:00 2001 From: GRZ4NA Date: Sun, 5 Sep 2021 16:43:02 +0200 Subject: [PATCH] added discord api types --- src/types/api.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/types/api.ts diff --git a/src/types/api.ts b/src/types/api.ts new file mode 100644 index 0000000..3d8ae9a --- /dev/null +++ b/src/types/api.ts @@ -0,0 +1,24 @@ +export interface BaseCommandObject { + name: string; + type: number; + default_permissions: true; +} + +export interface TextCommandObject extends BaseCommandObject { + description: string; + options?: TextCommandOptionObject[]; +} + +export interface TextCommandOptionObject { + name: string; + description: string; + type: number; + required?: boolean; + choices?: TextCommandOptionChoiceObject[]; + options?: TextCommandOptionObject[]; +} + +export interface TextCommandOptionChoiceObject { + name: string; + value: string; +}