Skip to content

Commit a8fd7b7

Browse files
committed
complete first draft
1 parent 593c32a commit a8fd7b7

File tree

6 files changed

+29
-7
lines changed

6 files changed

+29
-7
lines changed

apps/nextra-docs/pages/docs/_meta.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"installation": "Installation",
33
"commandkit-setup": "CommandKit Setup",
4-
"handler-properties": "Handler Properties",
54
"command-file-setup": "Commands Setup",
65
"event-file-setup": "Events Setup",
76
"validation-file-setup": "Validations Setup"

apps/nextra-docs/pages/docs/validation-file-setup.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Tabs, Callout } from 'nextra/components';
22

33
# Validations Setup
44

5-
Validations are functions that are called before the `run()` function from a command object is called. They can be used for many things, including validating your command object, or even implementing features such as cooldowns where the user will not be able to run the command if a validation functions says so.
5+
Validations are functions that are called before the `run` function from a command object is called. They can be used for many things, including validating your command object, or even implementing features such as cooldowns where the user will not be able to run the command if a validation functions says so.
66

77
Validation functions are called on every command trigger, so it's important to keep them as lightweight as possible.
88

@@ -70,9 +70,9 @@ Validation functions are called on every command trigger, so it's important to k
7070

7171
Within every validation function, you have the ability to check what command is trying to be executed using `commandObj` and the `interaction` object from the parameters and respond accordingly.
7272

73-
The `commandObj` object is what's being exported from your command file (excluding the `run()` function). This means you can access the `data` and `options` property from within your validation function.
73+
The `commandObj` object is what's being exported from your command file (excluding the `run` function). This means you can access the `data` and `options` property from within your validation function.
7474

75-
The `handler` object is your [CommandKit instance](/api/classes/classcommandkit/).
75+
The `handler` object is the current CommandKit instance.
7676

7777
### Stopping the command from running
7878

apps/nextra-docs/pages/docs/handler-properties.mdx renamed to apps/nextra-docs/pages/typedef/CommandKit.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Handler properties
2-
3-
When a CommandKit class has been instantiated, it's easier to refer to the resulting object as the "handler". The `handler` object has properties which will be available throughout the whole project (commands, events, validations, etc) by extracting the `handler` object through the parameters. You'll learn more about this when you setup [commands](/docs/command-file-setup), [events](/docs/event-file-setup) and [validations](validation-file-setup).
1+
# CommandKit
42

53
### `commands`
64

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
11
# ContextMenuCommandProps
2+
3+
### `client`
4+
5+
- Type: [`Client`](https://old.discordjs.dev/#/docs/discord.js/main/class/Client)
6+
7+
### `handler`
8+
9+
- Type: [`CommandKit`](/typedef/CommandKit)
10+
11+
### `interaction`
12+
13+
- Type [`ContextMenuCommandInteraction`](https://old.discordjs.dev/#/docs/discord.js/main/class/ContextMenuCommandInteraction)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
11
# SlashCommandProps
2+
3+
### `client`
4+
5+
- Type: [`Client`](https://old.discordjs.dev/#/docs/discord.js/main/class/Client)
6+
7+
### `handler`
8+
9+
- Type: [`CommandKit`](/typedef/CommandKit)
10+
11+
### `interaction`
12+
13+
- Type [`ChatInputCommandInteraction`](https://old.discordjs.dev/#/docs/discord.js/main/class/ChatInputCommandInteraction)

apps/nextra-docs/pages/typedef/_meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"CommandData": "CommandData",
3+
"CommandKit": "CommandKit",
34
"CommandObject": "CommandObject",
45
"CommandOptions": "CommandOptions",
56
"ContextMenuCommandProps": "ContextMenuCommandProps",

0 commit comments

Comments
 (0)