Skip to content

Commit 3bc71b4

Browse files
committed
update commandkit to 0.1.0
1 parent 8190236 commit 3bc71b4

File tree

6 files changed

+90
-6
lines changed

6 files changed

+90
-6
lines changed

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ jobs:
2626
run: pnpm install
2727

2828
- name: 🚚 Publish
29-
run: pnpm run publish
29+
run: pnpm run deploy:package
3030
env:
3131
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "commandkit",
3-
"version": "0.0.10",
3+
"version": "0.0.0",
44
"private": true,
55
"license": "MIT",
66
"scripts": {
77
"dev": "turbo dev",
88
"lint": "turbo lint && prettier ./ --check --ignore-path=.prettierignore",
99
"build": "turbo lint && turbo build",
10-
"publish": "turbo publish --filter='commandkit'"
10+
"deploy:package": "turbo lint --filter='commandkit' && turbo build --filter='commandkit' && turbo deploy --filter='commandkit'"
1111
},
1212
"devDependencies": {
1313
"prettier": "^3.0.3",

packages/commandkit/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/.github
55
/.vscode
66
/.git
7+
/.turbo
78

89
.DS_Store
910
tsconfig.json

packages/commandkit/README.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# CommandKit
2+
3+
CommandKit is a library that makes it easy to handle commands (+ validations), and events in your Discord.js projects.
4+
5+
**Supports Discord.js version 14**
6+
7+
# Features
8+
9+
- Very beginner friendly 🚀
10+
- Support for slash and context menu commands ✅
11+
- Automatic command registration, edits, and deletion 🤖
12+
- Supports multiple development servers 🤝
13+
- Supports multiple users as bot developers 👥
14+
- Object oriented 💻
15+
16+
# Documentation
17+
18+
You can find the full documentation [here](https://commandkit.underctrl.io)
19+
20+
# Installation
21+
22+
[![npm](https://nodei.co/npm/commandkit.png)](https://nodei.co/npm/commandkit/)
23+
24+
To install CommandKit, simply run the following command:
25+
26+
For npm:
27+
28+
```bash
29+
npm install commandkit
30+
```
31+
32+
For yarn:
33+
34+
```bash
35+
yarn add commandkit
36+
```
37+
38+
# Usage
39+
40+
This is a simple overview of how to set up this library with all the options. You can read more in the [full documentation](https://commandkit.underctrl.io)
41+
42+
```js
43+
// index.js
44+
const { Client, GatewayIntentBits } = require('discord.js');
45+
const { CommandKit } = require('commandkit');
46+
const path = require('path');
47+
48+
const client = new Client({
49+
intents: [
50+
GatewayIntentBits.Guilds,
51+
GatewayIntentBits.GuildMessages,
52+
GatewayIntentBits.MessageContent,
53+
],
54+
});
55+
56+
new CommandKit({
57+
// Your discord.js client object
58+
client,
59+
60+
// Path to the commands folder
61+
commandsPath: path.join(__dirname, 'commands'),
62+
63+
// Path to the events folder
64+
eventsPath: path.join(__dirname, 'events'),
65+
66+
// Path to the validations folder (only valid if "commandsPath" was provided)
67+
validationsPath: path.join(__dirname, 'validations'),
68+
69+
// Array of development server IDs (used to register and run devOnly commands)
70+
devGuildIds: ['DEV_SERVER_ID_1', 'DEV_SERVER_ID_2'],
71+
72+
// Array of developer user IDs (used for devOnly commands)
73+
devUserIds: ['DEV_USER_ID_1', 'DEV_USER_ID_2'],
74+
75+
// Array of developer role IDs (used for devOnly commands)
76+
devRoleIds: ['DEV_ROLE_ID_1', 'DEV_ROLE_ID_2'],
77+
78+
// A property that disables CommandKit's built-in validations
79+
skipBuiltInValidations: true,
80+
});
81+
82+
client.login('YOUR_TOKEN_HERE');
83+
```

packages/commandkit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "commandkit",
3-
"version": "0.0.12",
3+
"version": "0.1.0",
44
"license": "MIT",
55
"main": "./dist/index.js",
66
"module": "./dist/index.mjs",
@@ -16,7 +16,7 @@
1616
"lint": "tsc",
1717
"dev": "tsup --watch",
1818
"build": "tsup",
19-
"publish": "pnpm lint && pnpm build && npm publish",
19+
"deploy": "npm publish",
2020
"test": "tsx tests/index.ts"
2121
},
2222
"repository": {

turbo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"pipeline": {
44
"lint": {},
55
"build": {},
6-
"publish": {},
6+
"deploy": {},
77
"dev": {
88
"cache": false,
99
"persistent": true

0 commit comments

Comments
 (0)