Skip to content

Commit 666dfa9

Browse files
committed
setup structure
1 parent 15071f0 commit 666dfa9

24 files changed

+170
-48
lines changed

apps/nextra-docs/pages/_app.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import '../styles/globals.css';
2+
import Head from 'next/head';
23

34
export default function Nextra({ Component, pageProps }) {
4-
return <Component {...pageProps} />;
5+
return (
6+
<>
7+
<Head>
8+
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
9+
</Head>
10+
<Component {...pageProps} />
11+
</>
12+
);
513
}

apps/nextra-docs/pages/_meta.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
"title": "Home",
44
"type": "page"
55
},
6-
"guides": {
7-
"title": "Guides",
8-
"type": "page"
9-
},
106
"docs": {
117
"title": "Documentation",
128
"type": "page"
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
2-
"classes": "Classes",
3-
"typedef": "Type Definitions",
4-
"enums": "Enums"
2+
"installation": "Installation",
3+
"commandkit-setup": "CommandKit Setup",
4+
"handler-properties": "Handler Properties",
5+
"command-file-setup": "Commands Setup",
6+
"event-file-setup": "Events Setup",
7+
"validation-file-setup": "Validations Setup"
58
}

apps/nextra-docs/pages/docs/classes/CommandKit.mdx

Lines changed: 0 additions & 1 deletion
This file was deleted.

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

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

apps/nextra-docs/pages/guides/commandkit-setup.mdx renamed to apps/nextra-docs/pages/docs/commandkit-setup.mdx

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

33
# CommandKit Setup
44

5-
This is a simple overview of how to set up CommandKit with all the available options. You’d usually set this up in your entry point file (e.g. `index.js`) where you have access to your Discord client object.
5+
This is a simple overview of how to set up CommandKit with all the available options. You’d usually set this up in your entry file (e.g. `index.js`) where you have access to your Discord.js client object.
66

77
<Tabs items={['CommonJS', 'ESM', 'TypeScript']}>
88
<Tabs.Tab>
@@ -99,3 +99,59 @@ This is a simple overview of how to set up CommandKit with all the available opt
9999
<Callout>
100100
**Note:** Some Discord.js properties are only accessible using the correct intents.
101101
</Callout>
102+
103+
## CommandKit options
104+
105+
### `client`
106+
107+
- Type: [`Client`](https://discord.js.org/docs/packages/core/1.0.1/Client:Class)
108+
109+
This is your Discord.js client object. This is required to register and handle application commands and events.
110+
111+
### `commandsPath` (optional)
112+
113+
- Type: `string`
114+
115+
This is the path to your commands directory. It's used to fetch, register, and listen for application commands.
116+
117+
### `eventsPath` (optional)
118+
119+
- Type: `string`
120+
121+
This is the path to your events directory. It's used to fetch and set event listeners based on the folder names inside of it.
122+
123+
### `validationsPath` (optional)
124+
125+
- Type: `string`
126+
127+
This is the path to your validations directory. It's used to fetch and call validation functions before running application commands.
128+
129+
### `devGuildIds` (optional)
130+
131+
- Type: `string[]`
132+
133+
This is a list of development server IDs. It's used to restrict commands marked with `devOnly` to specific servers.
134+
135+
If there is at least 1 guild ID provided, CommandKit will register any commands marked as `devOnly` inside the listed servers.
136+
137+
### `devUserIds` (optional)
138+
139+
- Type: `string[]`
140+
141+
This is a list of developer user IDs. It's used to restrict commands marked with `devOnly` to specific users.
142+
143+
Trying to execute a command when this is set to at-least 1 user ID will call a built-in validation function everytime to validate that the user running the command belongs to the provided `devUserIds` array.
144+
145+
### `devRoleIds` (optional)
146+
147+
- Type: `string[]`
148+
149+
This is a list of developer role IDs. It's used to restrict commands marked with `devOnly` to specific roles.
150+
151+
Trying to execute a command when this is set to at-least 1 role ID will call a built-in validation function everytime to validate that the user running the command has at least one of the provided roles.
152+
153+
### `skipBuiltInValidations` (optional)
154+
155+
- Type: `boolean`
156+
157+
This is used to disable CommandKit's built-in validation functions. Setting this to `true` will ignore the default behaviour of validating who is running commands marked with `devOnly`.

apps/nextra-docs/pages/docs/enums/CommandType.mdx

Lines changed: 0 additions & 1 deletion
This file was deleted.

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

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

0 commit comments

Comments
 (0)