You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
6
6
7
7
<Tabsitems={['CommonJS', 'ESM', 'TypeScript']}>
8
8
<Tabs.Tab>
@@ -99,3 +99,59 @@ This is a simple overview of how to set up CommandKit with all the available opt
99
99
<Callout>
100
100
**Note:** Some Discord.js properties are only accessible using the correct intents.
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`.
0 commit comments