From 9678e4e1e87a5d73c47683fe85848888ca8e857b Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 9 Sep 2025 18:05:15 -0700 Subject: refactor: Move Discord APIs to Discord module --- src/discord/interfaces.ts | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 src/discord/interfaces.ts (limited to 'src/discord/interfaces.ts') 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; +} -- cgit v1.2.3