Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 0ac1473

Browse files
committed
chore: Add slash command interface
1 parent 6ea5342 commit 0ac1473

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/types/main.d.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1+
import { ApplicationCommandOptionBase, ChatInputCommandInteraction } from "discord.js";
2+
import { KOGBot } from "index.ts";
3+
14
declare interface GatewayEvent {
25
name: string,
3-
code: (...params) => Promise<void>;
46
once: boolean;
7+
code: (...params) => Promise<void>;
58
}
69

710
declare interface EventsClass {
811
functions: Array<GatewayEvent>;
912
parse: () => Promise<GatewayEvent[]>;
1013
listen: () => Promise<void>;
14+
}
15+
16+
declare interface SlashCommand {
17+
name: string;
18+
description: string;
19+
subcommands: Array<SlashCommand>;
20+
parameters: Array<ApplicationCommandOptionBase>;
21+
dev?: boolean;
22+
kogBot: KOGBot;
23+
24+
execute (interaction: ChatInputCommandInteraction): Promise<void>;
1125
}

0 commit comments

Comments
 (0)