commandkit 0.1.3-dev.20231003135416 → 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/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.20231003135416",
4
+ "version": "0.1.3-dev.20231003141201",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",