summaryrefslogtreecommitdiff
path: root/packages/interactions/discord/interfaces.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/interactions/discord/interfaces.ts')
-rw-r--r--packages/interactions/discord/interfaces.ts86
1 files changed, 86 insertions, 0 deletions
diff --git a/packages/interactions/discord/interfaces.ts b/packages/interactions/discord/interfaces.ts
new file mode 100644
index 0000000..bc8683c
--- /dev/null
+++ b/packages/interactions/discord/interfaces.ts
@@ -0,0 +1,86 @@
+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;
+ };
+ guild_id?: string;
+ user?: {
+ id: string;
+ username: string;
+ avatar?: string;
+ };
+ member?: {
+ user?: {
+ id: string;
+ username: string;
+ avatar?: string;
+ };
+ roles?: string[];
+ permissions?: string;
+ };
+}
+
+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 };
+ thumbnail?: { url: string };
+}
+
+export interface DiscordResponse {
+ type: number;
+ data?: {
+ content?: string;
+ embeds?: DiscordEmbed[];
+ flags?: number;
+ };
+}
+
+export interface DiscordCommand {
+ name: string;
+ description: string;
+ options?: DiscordCommandOption[];
+ contexts?: number[];
+}
+
+export interface DiscordCommandOption {
+ type: number;
+ name: string;
+ description: string;
+ required?: boolean;
+ choices?: DiscordCommandChoice[];
+}
+
+export interface DiscordCommandChoice {
+ name: string;
+ value: string;
+}