Skip to content

Commit f0838d6

Browse files
committed
custom events doc tweaks
1 parent 816bbae commit f0838d6

File tree

6 files changed

+18
-227
lines changed

6 files changed

+18
-227
lines changed

apps/website/docs/guide/03-events/02-custom-events.mdx

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
---
2-
title: Custom events
2+
title: Custom Events
33
---
44

55
CommandKit also supports using custom events in the `events`
66
directory. Custom events must be defined in a namespaced directory,
7-
which are primarily handled by plugins. For example, if you have a
8-
custom event called `guildMemberBoost`, you can create a file called
9-
`src/app/events/(custom)/guildMemberBoost/handler.ts` which will be
10-
handled by the appropriate plugins.
7+
which are primarily handled by plugins.
118

12-
:::info
9+
For example, if you have a plugin that is handling a custom event
10+
called `"guildMemberBoost"` under a namespace called `"custom"`, you
11+
can create a file in the `src/app/events/(custom)/guildMemberBoost`
12+
directory which will be handled by the appropriate plugin.
1313

14-
Event namespace directories are not the same as
15-
[command categories](../02-commands/06-category-directory.mdx) as they
16-
serve a different purpose.
14+
:::warning
15+
16+
The `"custom"` namespace above is just an example. Namespaces will
17+
generally be set by plugins, so make sure to check the plugin's
18+
documentation for the correct one.
1719

1820
:::
1921

20-
The usage of custom events is the same way as
21-
[Discord.js events](./01-discordjs-events.mdx). The only difference is
22-
that these events are namespaced and are primarily handled by plugins.
22+
:::danger
23+
24+
Event namespace directories are **not** the same as
25+
[command categories](../02-commands/06-category-directory.mdx).
26+
27+
:::
2328

2429
## How plugins execute namespaced events
2530

apps/website/docs/guide/08-advanced/04-migrating-from-v0.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Migrating from v0
2+
title: Migrating From v0
33
---
44

55
import Tabs from '@theme/Tabs';

apps/website/docs/guide/08-advanced/05-event-handler-flow.mdx

Lines changed: 0 additions & 3 deletions
This file was deleted.

apps/website/docs/guide/08-advanced/06-command-handler-flow.mdx

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

apps/website/docs/guide/14-useful-utilities/index.mdx

Lines changed: 0 additions & 208 deletions
This file was deleted.

0 commit comments

Comments
 (0)