commandkit 0.1.11-dev.20250330125518 → 0.1.11-dev.20250330132756
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -72
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,85 +30,19 @@ You can find the full documentation [here](https://commandkit.dev).
|
|
|
30
30
|
|
|
31
31
|
[](https://nodei.co/npm/commandkit/)
|
|
32
32
|
|
|
33
|
-
To
|
|
33
|
+
To create a new CommandKit project, you can use the following command:
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
<!-- TODO: use stable version -->
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
npm
|
|
38
|
+
npm create commandkit@dev
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
This will prompt you to enter few details about your project. Once you have entered the details, you can simply run `commandkit dev` to start the bot application.
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
yarn add commandkit
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
pnpm:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
pnpm add commandkit
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Install development version
|
|
54
|
-
|
|
55
|
-
To install the development version of CommandKit, run the following command:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
npm install commandkit@dev
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
> ⚠️ The development version is likely to have bugs.
|
|
62
|
-
|
|
63
|
-
## Usage
|
|
43
|
+
## Getting Started
|
|
64
44
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
```js
|
|
68
|
-
// index.js
|
|
69
|
-
const { Client, GatewayIntentBits } = require('discord.js');
|
|
70
|
-
const { CommandKit } = require('commandkit');
|
|
71
|
-
const path = require('path');
|
|
72
|
-
|
|
73
|
-
const client = new Client({
|
|
74
|
-
intents: [
|
|
75
|
-
GatewayIntentBits.Guilds,
|
|
76
|
-
GatewayIntentBits.GuildMessages,
|
|
77
|
-
GatewayIntentBits.MessageContent,
|
|
78
|
-
],
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
new CommandKit({
|
|
82
|
-
// Your discord.js client object
|
|
83
|
-
client,
|
|
84
|
-
|
|
85
|
-
// Path to the commands folder
|
|
86
|
-
commandsPath: path.join(__dirname, 'commands'),
|
|
87
|
-
|
|
88
|
-
// Path to the events folder
|
|
89
|
-
eventsPath: path.join(__dirname, 'events'),
|
|
90
|
-
|
|
91
|
-
// Path to the validations folder (only valid if "commandsPath" was provided)
|
|
92
|
-
validationsPath: path.join(__dirname, 'validations'),
|
|
93
|
-
|
|
94
|
-
// Array of development server IDs (used to register and run devOnly commands)
|
|
95
|
-
devGuildIds: ['1234567890', '0987654321'],
|
|
96
|
-
|
|
97
|
-
// Array of developer user IDs (used for devOnly commands)
|
|
98
|
-
devUserIds: ['1234567890', '0987654321'],
|
|
99
|
-
|
|
100
|
-
// Array of developer role IDs (used for devOnly commands)
|
|
101
|
-
devRoleIds: ['1234567890', '0987654321'],
|
|
102
|
-
|
|
103
|
-
// Disable CommandKit's built-in validations
|
|
104
|
-
skipBuiltInValidations: true,
|
|
105
|
-
|
|
106
|
-
// Update command registration/reload behaviour to register all commands at once
|
|
107
|
-
bulkRegister: true,
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
client.login('YOUR_TOKEN_HERE');
|
|
111
|
-
```
|
|
45
|
+
To get started with CommandKit, you can check out the [quick start guide](https://commandkit.dev/docs/next/guide/installation).
|
|
112
46
|
|
|
113
47
|
## Support and Suggestions
|
|
114
48
|
|