File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
apps/website/docs/guide/05-official-plugins Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,7 @@ This is an experimental feature and is subject to change.
12
12
13
13
:::
14
14
15
- ## Architecture Overview
16
-
17
- The AI system consists of several key components:
15
+ ## Architecture overview
18
16
19
17
``` mermaid
20
18
graph TD
@@ -31,16 +29,16 @@ graph TD
31
29
K[AI Commands] --> F
32
30
```
33
31
34
- AI plugin basically acts as a smart command handler that decides which
35
- command to execute based on the given prompt. Similarly, the AI
36
- commands are basically an abstraction for tool calling feature of the
37
- large language models. This plugin uses the
38
- [ ai sdk ] ( https://ai-sdk.dev ) under the hood to interact with large
32
+ The ` @commandkit/ai ` plugin basically acts as a smart command handler
33
+ that decides which command to execute based on the given prompt.
34
+ Similarly, the AI commands are basically an abstraction for tool
35
+ calling feature of the large language models. This plugin uses the
36
+ [ AI SDK ] ( https://ai-sdk.dev ) under the hood to interact with large
39
37
language models.
40
38
41
39
## Installation
42
40
43
- Install the AI plugin and your preferred AI SDK:
41
+ Install the plugin and your preferred AI SDK:
44
42
45
43
``` bash npm2yarn
46
44
npm install @commandkit/ai
Original file line number Diff line number Diff line change 1
- import {
1
+ import type {
2
2
CacheType ,
3
3
Client ,
4
+ ClientEvents ,
4
5
Interaction ,
5
6
RESTPostAPIApplicationCommandsJSONBody ,
6
7
} from 'discord.js' ;
@@ -51,3 +52,10 @@ export type CommandData = Prettify<
51
52
aliases ?: string [ ] ;
52
53
}
53
54
> ;
55
+
56
+ /**
57
+ * Represents an event handler for a specific event.
58
+ */
59
+ export type EventHandler < K extends keyof ClientEvents > = (
60
+ ...args : ClientEvents [ K ]
61
+ ) => void | Promise < void > ;
You can’t perform that action at this time.
0 commit comments