commandkit 0.1.3-dev.20231003123711 → 0.1.3-dev.20231003141201

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 CHANGED
@@ -1,13 +1,16 @@
1
- <h1 align="center">
2
- <img src="https://raw.githubusercontent.com/underctrl-io/commandkit/master/apps/docs/public/ckit_logo.png" width="50%">
3
- <br>
4
- </h1>
1
+ <div align="center">
2
+ <img src="https://raw.githubusercontent.com/underctrl-io/commandkit/master/apps/docs/public/ckit_logo.png" width="60%" />
3
+ <br />
4
+ <a href="https://ctrl.lol/discord"><img src="https://img.shields.io/discord/1055188344188973066?color=5865F2&logo=discord&logoColor=white" alt="support server" /></a>
5
+ <a href="https://www.npmjs.com/package/commandkit"><img src="https://img.shields.io/npm/v/commandkit?maxAge=3600" alt="npm version" /></a>
6
+ <a href="https://www.npmjs.com/package/commandkit"><img src="https://img.shields.io/npm/dt/commandkit?maxAge=3600" alt="npm downloads" /></a>
7
+ </div>
5
8
 
6
9
  # CommandKit
7
10
 
8
11
  CommandKit is a library that makes it easy to handle commands and events in your Discord.js projects.
9
12
 
10
- **Supports Discord.js version 14**
13
+ > **Supports Discord.js version 14**
11
14
 
12
15
  ## Features
13
16
 
@@ -20,7 +23,7 @@ CommandKit is a library that makes it easy to handle commands and events in your
20
23
 
21
24
  ## Documentation
22
25
 
23
- You can find the full documentation [here](https://commandkit.js.org)
26
+ You can find the full documentation [here](https://commandkit.js.org).
24
27
 
25
28
  ## Installation
26
29
 
@@ -88,13 +91,13 @@ new CommandKit({
88
91
  validationsPath: path.join(__dirname, 'validations'),
89
92
 
90
93
  // Array of development server IDs (used to register and run devOnly commands)
91
- devGuildIds: ['DEV_SERVER_ID_1', 'DEV_SERVER_ID_2'],
94
+ devGuildIds: ['1234567890', '0987654321'],
92
95
 
93
96
  // Array of developer user IDs (used for devOnly commands)
94
- devUserIds: ['DEV_USER_ID_1', 'DEV_USER_ID_2'],
97
+ devUserIds: ['1234567890', '0987654321'],
95
98
 
96
99
  // Array of developer role IDs (used for devOnly commands)
97
- devRoleIds: ['DEV_ROLE_ID_1', 'DEV_ROLE_ID_2'],
100
+ devRoleIds: ['1234567890', '0987654321'],
98
101
 
99
102
  // A property that disables CommandKit's built-in validations
100
103
  skipBuiltInValidations: true,
@@ -102,3 +105,7 @@ new CommandKit({
102
105
 
103
106
  client.login('YOUR_TOKEN_HERE');
104
107
  ```
108
+
109
+ ## Support and Suggestions
110
+
111
+ If you are looking for support or want to provide suggestions, check out the [Discord](https://ctrl.lol/discord).
package/dist/index.d.mts CHANGED
@@ -1,56 +1,4 @@
1
- import { Client, Interaction, CommandInteraction, ChatInputCommandInteraction, ContextMenuCommandInteraction, PermissionResolvable, APIApplicationCommandOption } from 'discord.js';
2
-
3
- interface CommandKitOptions {
4
- /**
5
- * The Discord.js client object to use with CommandKit.
6
- */
7
- client: Client;
8
- /**
9
- * The path to your commands directory.
10
- */
11
- commandsPath?: string;
12
- /**
13
- * The path to your events directory.
14
- */
15
- eventsPath?: string;
16
- /**
17
- * The path to the validations directory.
18
- */
19
- validationsPath?: string;
20
- /**
21
- * List of development guild IDs to restrict devOnly commands to.
22
- */
23
- devGuildIds?: string[];
24
- /**
25
- * List of developer user IDs to restrict devOnly commands to.
26
- */
27
- devUserIds?: string[];
28
- /**
29
- * List of developer role IDs to restrict devOnly commands to.
30
- */
31
- devRoleIds?: string[];
32
- /**
33
- * Skip CommandKit's built-in validations (for devOnly commands).
34
- */
35
- skipBuiltInValidations?: boolean;
36
- /**
37
- * Bulk register application commands instead of one-by-one.
38
- */
39
- bulkRegister?: boolean;
40
- }
41
- interface CommandFileObject {
42
- data: CommandData;
43
- options?: CommandOptions;
44
- run: ({}: {
45
- interaction: Interaction;
46
- client: Client;
47
- handler: CommandKit;
48
- }) => void;
49
- filePath: string;
50
- category: string | null;
51
- [key: string]: any;
52
- }
53
- type ReloadOptions = 'dev' | 'global' | ReloadType;
1
+ import { CommandInteraction, Client, ChatInputCommandInteraction, ContextMenuCommandInteraction, PermissionResolvable, APIApplicationCommandOption } from 'discord.js';
54
2
 
55
3
  interface CommandProps {
56
4
  interaction: CommandInteraction;
@@ -105,12 +53,58 @@ type UserOrMessageCommandData = BaseCommandData & {
105
53
  type: CommandType.User | CommandType.Message;
106
54
  };
107
55
  type CommandData = ChatInputCommandData | UserOrMessageCommandData;
108
- type CommandObject = Omit<CommandFileObject, 'run'>;
56
+ type CommandObject = {
57
+ data: CommandData;
58
+ options?: CommandOptions;
59
+ filePath: string;
60
+ category: string | null;
61
+ [key: string]: any;
62
+ };
109
63
  declare enum ReloadType {
110
64
  'Developer' = "dev",
111
65
  'Global' = "global"
112
66
  }
113
67
 
68
+ interface CommandKitOptions {
69
+ /**
70
+ * The Discord.js client object to use with CommandKit.
71
+ */
72
+ client: Client;
73
+ /**
74
+ * The path to your commands directory.
75
+ */
76
+ commandsPath?: string;
77
+ /**
78
+ * The path to your events directory.
79
+ */
80
+ eventsPath?: string;
81
+ /**
82
+ * The path to the validations directory.
83
+ */
84
+ validationsPath?: string;
85
+ /**
86
+ * List of development guild IDs to restrict devOnly commands to.
87
+ */
88
+ devGuildIds?: string[];
89
+ /**
90
+ * List of developer user IDs to restrict devOnly commands to.
91
+ */
92
+ devUserIds?: string[];
93
+ /**
94
+ * List of developer role IDs to restrict devOnly commands to.
95
+ */
96
+ devRoleIds?: string[];
97
+ /**
98
+ * Skip CommandKit's built-in validations (for devOnly commands).
99
+ */
100
+ skipBuiltInValidations?: boolean;
101
+ /**
102
+ * Bulk register application commands instead of one-by-one.
103
+ */
104
+ bulkRegister?: boolean;
105
+ }
106
+ type ReloadOptions = 'dev' | 'global' | ReloadType;
107
+
114
108
  declare class CommandKit {
115
109
  #private;
116
110
  constructor(options: CommandKitOptions);
package/dist/index.d.ts CHANGED
@@ -1,56 +1,4 @@
1
- import { Client, Interaction, CommandInteraction, ChatInputCommandInteraction, ContextMenuCommandInteraction, PermissionResolvable, APIApplicationCommandOption } from 'discord.js';
2
-
3
- interface CommandKitOptions {
4
- /**
5
- * The Discord.js client object to use with CommandKit.
6
- */
7
- client: Client;
8
- /**
9
- * The path to your commands directory.
10
- */
11
- commandsPath?: string;
12
- /**
13
- * The path to your events directory.
14
- */
15
- eventsPath?: string;
16
- /**
17
- * The path to the validations directory.
18
- */
19
- validationsPath?: string;
20
- /**
21
- * List of development guild IDs to restrict devOnly commands to.
22
- */
23
- devGuildIds?: string[];
24
- /**
25
- * List of developer user IDs to restrict devOnly commands to.
26
- */
27
- devUserIds?: string[];
28
- /**
29
- * List of developer role IDs to restrict devOnly commands to.
30
- */
31
- devRoleIds?: string[];
32
- /**
33
- * Skip CommandKit's built-in validations (for devOnly commands).
34
- */
35
- skipBuiltInValidations?: boolean;
36
- /**
37
- * Bulk register application commands instead of one-by-one.
38
- */
39
- bulkRegister?: boolean;
40
- }
41
- interface CommandFileObject {
42
- data: CommandData;
43
- options?: CommandOptions;
44
- run: ({}: {
45
- interaction: Interaction;
46
- client: Client;
47
- handler: CommandKit;
48
- }) => void;
49
- filePath: string;
50
- category: string | null;
51
- [key: string]: any;
52
- }
53
- type ReloadOptions = 'dev' | 'global' | ReloadType;
1
+ import { CommandInteraction, Client, ChatInputCommandInteraction, ContextMenuCommandInteraction, PermissionResolvable, APIApplicationCommandOption } from 'discord.js';
54
2
 
55
3
  interface CommandProps {
56
4
  interaction: CommandInteraction;
@@ -105,12 +53,58 @@ type UserOrMessageCommandData = BaseCommandData & {
105
53
  type: CommandType.User | CommandType.Message;
106
54
  };
107
55
  type CommandData = ChatInputCommandData | UserOrMessageCommandData;
108
- type CommandObject = Omit<CommandFileObject, 'run'>;
56
+ type CommandObject = {
57
+ data: CommandData;
58
+ options?: CommandOptions;
59
+ filePath: string;
60
+ category: string | null;
61
+ [key: string]: any;
62
+ };
109
63
  declare enum ReloadType {
110
64
  'Developer' = "dev",
111
65
  'Global' = "global"
112
66
  }
113
67
 
68
+ interface CommandKitOptions {
69
+ /**
70
+ * The Discord.js client object to use with CommandKit.
71
+ */
72
+ client: Client;
73
+ /**
74
+ * The path to your commands directory.
75
+ */
76
+ commandsPath?: string;
77
+ /**
78
+ * The path to your events directory.
79
+ */
80
+ eventsPath?: string;
81
+ /**
82
+ * The path to the validations directory.
83
+ */
84
+ validationsPath?: string;
85
+ /**
86
+ * List of development guild IDs to restrict devOnly commands to.
87
+ */
88
+ devGuildIds?: string[];
89
+ /**
90
+ * List of developer user IDs to restrict devOnly commands to.
91
+ */
92
+ devUserIds?: string[];
93
+ /**
94
+ * List of developer role IDs to restrict devOnly commands to.
95
+ */
96
+ devRoleIds?: string[];
97
+ /**
98
+ * Skip CommandKit's built-in validations (for devOnly commands).
99
+ */
100
+ skipBuiltInValidations?: boolean;
101
+ /**
102
+ * Bulk register application commands instead of one-by-one.
103
+ */
104
+ bulkRegister?: boolean;
105
+ }
106
+ type ReloadOptions = 'dev' | 'global' | ReloadType;
107
+
114
108
  declare class CommandKit {
115
109
  #private;
116
110
  constructor(options: CommandKitOptions);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "commandkit",
3
3
  "description": "Beginner friendly command & event handler for Discord.js",
4
- "version": "0.1.3-dev.20231003123711",
4
+ "version": "0.1.3-dev.20231003141201",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",