diff options
| author | Fuwn <[email protected]> | 2025-09-09 18:05:15 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-09-09 18:05:15 -0700 |
| commit | 9678e4e1e87a5d73c47683fe85848888ca8e857b (patch) | |
| tree | 42235ab613eba920ef46ceaba946f2fdc6362427 /src/discord/interfaces.ts | |
| parent | fix: Properly handle videos (diff) | |
| download | umabotdiscord-9678e4e1e87a5d73c47683fe85848888ca8e857b.tar.xz umabotdiscord-9678e4e1e87a5d73c47683fe85848888ca8e857b.zip | |
refactor: Move Discord APIs to Discord module
Diffstat (limited to 'src/discord/interfaces.ts')
| -rw-r--r-- | src/discord/interfaces.ts | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/discord/interfaces.ts b/src/discord/interfaces.ts new file mode 100644 index 0000000..3eb81eb --- /dev/null +++ b/src/discord/interfaces.ts @@ -0,0 +1,69 @@ +export interface Environment { + DISCORD_APPLICATION_ID: string; + DISCORD_PUBLIC_KEY: string; + DISCORD_TOKEN: string; +} + +export interface DiscordInteraction { + type: number; + data: { + name: string; + options?: Array<{ + name: string; + value: string; + }>; + }; + channel_id?: string; + channel?: { + nsfw: boolean; + }; +} + +export interface DiscordEmbed { + title: string; + description: string; + url: string; + color: number; + author: { + name: string; + url: string; + }; + fields: Array<{ + name: string; + value: string; + inline: boolean; + }>; + timestamp: string; + footer: { + text: string; + }; + image?: { url: string }; +} + +export interface DiscordResponse { + type: number; + data?: { + content?: string; + embeds?: DiscordEmbed[]; + flags?: number; + }; +} + +export interface DiscordCommand { + name: string; + description: string; + options?: DiscordCommandOption[]; +} + +export interface DiscordCommandOption { + type: number; + name: string; + description: string; + required?: boolean; + choices?: DiscordCommandChoice[]; +} + +export interface DiscordCommandChoice { + name: string; + value: string; +} |