Skip to content

Commit 252c289

Browse files
committed
document commands category dir
1 parent 28f8fac commit 252c289

File tree

6 files changed

+45
-6
lines changed

6 files changed

+45
-6
lines changed

apps/website/docs/guide/02-commands/01-chat-input-commands.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Chat input commands
2+
title: Chat Input Commands
33
---
44

55
Chat input commands, more commonly known as 'Slash Commands', are a

apps/website/docs/guide/02-commands/02-command-options-autocomplete.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Options autocomplete
2+
title: Options Autocomplete
33
---
44

55
:::warning

apps/website/docs/guide/02-commands/03-context-menu-commands.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Context menu commands
2+
title: Context Menu Commands
33
---
44

55
Context menu commands allows users on Discord to run commands by

apps/website/docs/guide/02-commands/04-message-commands.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Message commands
2+
title: Message Commands
33
---
44

55
Message commands, which are generally considered 'Legacy', are a way

apps/website/docs/guide/02-commands/05-after-function.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: after function
2+
title: after Function
33
---
44

55
The `after` function allows you to execute a callback after a command
Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
11
---
2-
title: Category directory
2+
title: Category Directory
33
---
4+
5+
Category directories are special directories inside
6+
`src/app/commands`, with `(categoryName)` as their name.
7+
8+
It is primarily used to group related commands together. This is
9+
useful for organizing your commands into logical groups, making it
10+
easier to manage and maintain your code. You can even nest multiple
11+
category directories to create a hierarchy of commands. This can then
12+
be used across your application in places such as middlewares,
13+
plugins, or even other commands through your `commandkit` instance.
14+
15+
## Example Structure
16+
17+
```title="" {4-15}
18+
.
19+
├── src/
20+
│ ├── app/
21+
│ │ ├── commands/
22+
│ │ │ ├── (Fun)/
23+
│ │ │ │ ├── (Jokes)/
24+
│ │ │ │ │ ├── random-joke.ts
25+
│ │ │ │ │ └── dad-joke.ts
26+
│ │ │ │ ├── 8ball.ts
27+
│ │ │ │ ├── cat.ts
28+
│ │ │ │ └── dog.ts
29+
│ │ │ └── (Moderation)/
30+
│ │ │ ├── timeout.ts
31+
│ │ │ ├── kick.ts
32+
│ │ │ └── ban.ts
33+
│ │ └── events/
34+
│ │ └── ready/
35+
│ │ └── log.ts
36+
│ └── app.ts
37+
├── .env
38+
├── .gitignore
39+
├── commandkit.config.ts
40+
├── package.json
41+
└── tsconfig.json
42+
```

0 commit comments

Comments
 (0)