xernerx 4.17.4 → 4.17.5

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.
Files changed (62) hide show
  1. package/dist/build/XernerxContextCommand.d.ts +75 -47
  2. package/dist/build/XernerxContextCommand.js +119 -115
  3. package/dist/build/XernerxEvent.d.ts +10 -10
  4. package/dist/build/XernerxEvent.js +17 -17
  5. package/dist/build/XernerxInhibitor.d.ts +39 -15
  6. package/dist/build/XernerxInhibitor.js +18 -18
  7. package/dist/build/XernerxMessageCommand.d.ts +78 -52
  8. package/dist/build/XernerxMessageCommand.js +118 -114
  9. package/dist/build/XernerxSlashCommand.d.ts +96 -62
  10. package/dist/build/XernerxSlashCommand.js +176 -172
  11. package/dist/client/XernerxClient.d.ts +55 -46
  12. package/dist/client/XernerxClient.js +83 -88
  13. package/dist/client/XernerxShardClient.d.ts +14 -14
  14. package/dist/client/XernerxShardClient.js +61 -47
  15. package/dist/functions/deploy.js +45 -52
  16. package/dist/functions/load.js +28 -29
  17. package/dist/functions/reload.js +23 -24
  18. package/dist/functions/setPresence.d.ts +1 -1
  19. package/dist/functions/setPresence.js +17 -16
  20. package/dist/functions/xernerxUser.js +5 -6
  21. package/dist/handlers/CommandHandler.d.ts +10 -10
  22. package/dist/handlers/CommandHandler.js +311 -336
  23. package/dist/handlers/EventHandler.d.ts +3 -3
  24. package/dist/handlers/EventHandler.js +48 -21
  25. package/dist/handlers/ExtensionHandler.d.ts +3 -3
  26. package/dist/handlers/ExtensionHandler.js +23 -23
  27. package/dist/handlers/Handler.d.ts +19 -14
  28. package/dist/handlers/Handler.js +46 -50
  29. package/dist/handlers/InhibitorHandler.d.ts +3 -3
  30. package/dist/handlers/InhibitorHandler.js +25 -23
  31. package/dist/handlers/IntegrationHandler.d.ts +6 -6
  32. package/dist/handlers/IntegrationHandler.js +20 -20
  33. package/dist/main.d.ts +28 -21
  34. package/dist/main.js +28 -21
  35. package/dist/models/Arguments.d.ts +4 -1
  36. package/dist/models/Arguments.js +134 -149
  37. package/dist/models/Cooldowns.d.ts +6 -6
  38. package/dist/models/Cooldowns.js +25 -29
  39. package/dist/tools/XernerxError.d.ts +4 -4
  40. package/dist/tools/XernerxError.js +8 -8
  41. package/dist/tools/XernerxIntents.d.ts +2 -2
  42. package/dist/tools/XernerxIntents.js +21 -21
  43. package/dist/tools/XernerxLog.d.ts +23 -23
  44. package/dist/tools/XernerxLog.js +125 -110
  45. package/dist/tools/XernerxText.d.ts +23 -23
  46. package/dist/tools/XernerxText.js +79 -89
  47. package/dist/types/extenders.d.ts +55 -47
  48. package/dist/types/interfaces.d.ts +192 -189
  49. package/dist/types/types.d.ts +104 -5
  50. package/dist/utils/ClientUtil.d.ts +12 -9
  51. package/dist/utils/ClientUtil.js +96 -79
  52. package/dist/utils/InteractionUtil.d.ts +13 -13
  53. package/dist/utils/InteractionUtil.js +148 -147
  54. package/dist/utils/MessageUtil.d.ts +14 -14
  55. package/dist/utils/MessageUtil.js +162 -161
  56. package/dist/utils/Util.d.ts +4 -4
  57. package/dist/utils/Util.js +7 -7
  58. package/dist/validators/commandValidation.d.ts +4 -1
  59. package/dist/validators/commandValidation.js +157 -114
  60. package/dist/validators/inhibitorValidations.d.ts +21 -2
  61. package/dist/validators/inhibitorValidations.js +39 -39
  62. package/package.json +3 -3
@@ -4,51 +4,79 @@ import { XernerxMessageContextInteraction, XernerxUserContextInteraction, Xerner
4
4
  import { ContextCommandArguments, ContextCommandOptions } from '../types/interfaces.js';
5
5
  import InteractionUtil from '../utils/InteractionUtil.js';
6
6
  export default class XernerxContextCommand {
7
- readonly id: string;
8
- readonly data: ContextMenuCommandBuilder;
9
- readonly name: string;
10
- readonly type: 'user' | 'message';
11
- readonly description: string | null | undefined;
12
- readonly usage: string | null | undefined;
13
- readonly info: string | null | undefined;
14
- readonly category: string | null | undefined;
15
- readonly cooldown: number | null | undefined;
16
- readonly channel: ("GuildText" | "DM" | "GuildVoice" | "GroupDM" | "GuildCategory" | "GuildAnnouncement" | "AnnouncementThread" | "PublicThread" | "PrivateThread" | "GuildStageVoice" | "GuildDirectory" | "GuildForum" | "GuildMedia" | "GuildNews" | "GuildNewsThread" | "GuildPublicThread" | "GuildPrivateThread")[] | null;
17
- readonly global: boolean | undefined;
18
- readonly ignore: {
19
- owner?: boolean | undefined;
20
- users?: string[] | undefined;
21
- channels?: string[] | undefined;
22
- guilds?: string[] | undefined;
23
- voice?: boolean | undefined;
24
- } | undefined;
25
- readonly strict: {
26
- owner?: boolean | undefined;
27
- users?: string[] | undefined;
28
- channels?: string[] | undefined;
29
- guilds?: string[] | undefined;
30
- voice?: boolean | undefined;
31
- } | undefined;
32
- readonly permissions: {
33
- user?: string[] | import("../main.js").PermissionNames[] | null | undefined;
34
- client?: string[] | import("../main.js").PermissionNames[] | null | undefined;
35
- dm?: boolean | undefined;
36
- } | undefined;
37
- readonly defer: {
38
- reply?: boolean | undefined;
39
- ephemeral?: boolean | undefined;
40
- fetchReply?: boolean | undefined;
41
- } | undefined;
42
- readonly filetype: 'ContextCommand';
43
- readonly filepath: string;
44
- readonly client: XernerxClientType;
45
- util: InteractionUtil;
46
- snowflake: string | null;
47
- constructor(id: string, options: ContextCommandOptions);
48
- /**
49
- * @description the execution of the command
50
- * @param interaction - Interaction event emitted on command
51
- * @param args - The arguments parsed with the command, if any
52
- */
53
- exec(interaction: XernerxUserContextInteraction | XernerxMessageContextInteraction, args: ContextCommandArguments<'user' | 'message'>): Promise<any>;
7
+ readonly id: string;
8
+ readonly data: ContextMenuCommandBuilder;
9
+ readonly name: string;
10
+ readonly type: 'user' | 'message';
11
+ readonly description: string | null | undefined;
12
+ readonly usage: string | null | undefined;
13
+ readonly info: string | null | undefined;
14
+ readonly category: string | null | undefined;
15
+ readonly cooldown: number | null | undefined;
16
+ readonly channel:
17
+ | (
18
+ | 'GuildText'
19
+ | 'DM'
20
+ | 'GuildVoice'
21
+ | 'GroupDM'
22
+ | 'GuildCategory'
23
+ | 'GuildAnnouncement'
24
+ | 'AnnouncementThread'
25
+ | 'PublicThread'
26
+ | 'PrivateThread'
27
+ | 'GuildStageVoice'
28
+ | 'GuildDirectory'
29
+ | 'GuildForum'
30
+ | 'GuildMedia'
31
+ | 'GuildNews'
32
+ | 'GuildNewsThread'
33
+ | 'GuildPublicThread'
34
+ | 'GuildPrivateThread'
35
+ )[]
36
+ | null;
37
+ readonly global: boolean | undefined;
38
+ readonly ignore:
39
+ | {
40
+ owner?: boolean;
41
+ users?: Array<string>;
42
+ channels?: Array<string>;
43
+ guilds?: Array<string>;
44
+ voice?: boolean;
45
+ }
46
+ | undefined;
47
+ readonly strict:
48
+ | {
49
+ owner?: boolean;
50
+ users?: Array<string>;
51
+ channels?: Array<string>;
52
+ guilds?: Array<string>;
53
+ voice?: boolean;
54
+ }
55
+ | undefined;
56
+ readonly permissions:
57
+ | {
58
+ user?: Array<import('../main.js').PermissionNames> | Array<string> | null;
59
+ client?: Array<import('../main.js').PermissionNames> | Array<string> | null;
60
+ dm?: boolean;
61
+ }
62
+ | undefined;
63
+ readonly defer:
64
+ | {
65
+ reply?: boolean;
66
+ ephemeral?: boolean;
67
+ fetchReply?: boolean;
68
+ }
69
+ | undefined;
70
+ readonly filetype: 'ContextCommand';
71
+ readonly filepath: string;
72
+ readonly client: XernerxClientType;
73
+ util: InteractionUtil;
74
+ snowflake: string | null;
75
+ constructor(id: string, options: ContextCommandOptions);
76
+ /**
77
+ * @description the execution of the command
78
+ * @param interaction - Interaction event emitted on command
79
+ * @param args - The arguments parsed with the command, if any
80
+ */
81
+ exec(interaction: XernerxUserContextInteraction | XernerxMessageContextInteraction, args: ContextCommandArguments<'user' | 'message'>): Promise<any>;
54
82
  }
@@ -3,119 +3,123 @@ import { ContextMenuCommandBuilder } from 'discord.js';
3
3
  import { z } from 'zod';
4
4
  import XernerxLog from '../tools/XernerxLog.js';
5
5
  export default class XernerxContextCommand {
6
- constructor(id, options) {
7
- this.id = id;
8
- this.data = new ContextMenuCommandBuilder();
9
- this.data.setName(options.name);
10
- this.data.setNameLocalizations(options.nameLocalizations || null);
11
- this.data.setType(options.type === 'user' ? 2 : 3);
12
- this.data.setDMPermission(options.permissions?.dm || null);
13
- options = z
14
- .object({
15
- name: z.string(),
16
- type: z.enum(['user', 'message']),
17
- description: z.string().or(z.null()).default(null),
18
- usage: z.string().or(z.null()).default(null),
19
- info: z.string().or(z.null()).default(null),
20
- category: z.string().or(z.null()).default(null),
21
- cooldown: z.number().or(z.null()).default(null),
22
- global: z.boolean().default(true),
23
- channel: z
24
- .array(z.enum([
25
- 'GuildText',
26
- 'DM',
27
- 'GuildVoice',
28
- 'GroupDM',
29
- 'GuildCategory',
30
- 'GuildAnnouncement',
31
- 'AnnouncementThread',
32
- 'PublicThread',
33
- 'PrivateThread',
34
- 'GuildStageVoice',
35
- 'GuildDirectory',
36
- 'GuildForum',
37
- 'GuildNews',
38
- 'GuildNewsThread',
39
- 'GuildPublicThread',
40
- 'GuildPrivateThread',
41
- ]))
42
- .or(z.enum([
43
- 'GuildText',
44
- 'DM',
45
- 'GuildVoice',
46
- 'GroupDM',
47
- 'GuildCategory',
48
- 'GuildAnnouncement',
49
- 'AnnouncementThread',
50
- 'PublicThread',
51
- 'PrivateThread',
52
- 'GuildStageVoice',
53
- 'GuildDirectory',
54
- 'GuildForum',
55
- 'GuildNews',
56
- 'GuildNewsThread',
57
- 'GuildPublicThread',
58
- 'GuildPrivateThread',
59
- ]))
60
- .or(z.null())
61
- .default(null),
62
- ignore: z
63
- .object({
64
- owner: z.boolean().default(false),
65
- users: z.array(z.string()).default([]),
66
- channels: z.array(z.string()).default([]),
67
- guilds: z.array(z.string()).default([]),
68
- voice: z.boolean().default(false),
69
- })
70
- .default({}),
71
- strict: z
72
- .object({
73
- owner: z.boolean().default(false),
74
- users: z.array(z.string()).default([]),
75
- channels: z.array(z.string()).default([]),
76
- guilds: z.array(z.string()).default([]),
77
- voice: z.boolean().default(false),
78
- })
79
- .default({}),
80
- permissions: z
81
- .object({
82
- user: z.array(z.string()).or(z.null()).default(null),
83
- client: z.array(z.string()).or(z.null()).default(null),
84
- dm: z.boolean().default(true),
85
- })
86
- .default({}),
87
- defer: z
88
- .object({
89
- reply: z.boolean().optional(),
90
- ephemeral: z.boolean().optional(),
91
- fetch: z.boolean().optional(),
92
- })
93
- .default({}),
94
- })
95
- .parse(options);
96
- this.name = options.name;
97
- this.type = options.type;
98
- this.description = options.description;
99
- this.usage = options.usage;
100
- this.info = options.info;
101
- this.category = options.category;
102
- this.cooldown = options.cooldown;
103
- this.channel = options.channel ? (Array.isArray(options.channel) ? options.channel : [options.channel]) : null;
104
- this.global = options.global;
105
- this.ignore = options.ignore;
106
- this.strict = options.strict;
107
- this.permissions = options.permissions;
108
- this.defer = options.defer;
109
- this.client = this.client;
110
- this.util = this.util;
111
- }
112
- /**
113
- * @description the execution of the command
114
- * @param interaction - Interaction event emitted on command
115
- * @param args - The arguments parsed with the command, if any
116
- */
117
- async exec(interaction, args) {
118
- new XernerxLog(this.client).error(`${this.id} doesn't have an execution rule.`);
119
- return await this.client.emit('commandError', interaction, `${this.id} doesn't have an execution rule.`, this, this.filetype);
120
- }
6
+ constructor(id, options) {
7
+ this.id = id;
8
+ this.data = new ContextMenuCommandBuilder();
9
+ this.data.setName(options.name);
10
+ this.data.setNameLocalizations(options.nameLocalizations || null);
11
+ this.data.setType(options.type === 'user' ? 2 : 3);
12
+ this.data.setDMPermission(options.permissions?.dm || null);
13
+ options = z
14
+ .object({
15
+ name: z.string(),
16
+ type: z.enum(['user', 'message']),
17
+ description: z.string().or(z.null()).default(null),
18
+ usage: z.string().or(z.null()).default(null),
19
+ info: z.string().or(z.null()).default(null),
20
+ category: z.string().or(z.null()).default(null),
21
+ cooldown: z.number().or(z.null()).default(null),
22
+ global: z.boolean().default(true),
23
+ channel: z
24
+ .array(
25
+ z.enum([
26
+ 'GuildText',
27
+ 'DM',
28
+ 'GuildVoice',
29
+ 'GroupDM',
30
+ 'GuildCategory',
31
+ 'GuildAnnouncement',
32
+ 'AnnouncementThread',
33
+ 'PublicThread',
34
+ 'PrivateThread',
35
+ 'GuildStageVoice',
36
+ 'GuildDirectory',
37
+ 'GuildForum',
38
+ 'GuildNews',
39
+ 'GuildNewsThread',
40
+ 'GuildPublicThread',
41
+ 'GuildPrivateThread',
42
+ ])
43
+ )
44
+ .or(
45
+ z.enum([
46
+ 'GuildText',
47
+ 'DM',
48
+ 'GuildVoice',
49
+ 'GroupDM',
50
+ 'GuildCategory',
51
+ 'GuildAnnouncement',
52
+ 'AnnouncementThread',
53
+ 'PublicThread',
54
+ 'PrivateThread',
55
+ 'GuildStageVoice',
56
+ 'GuildDirectory',
57
+ 'GuildForum',
58
+ 'GuildNews',
59
+ 'GuildNewsThread',
60
+ 'GuildPublicThread',
61
+ 'GuildPrivateThread',
62
+ ])
63
+ )
64
+ .or(z.null())
65
+ .default(null),
66
+ ignore: z
67
+ .object({
68
+ owner: z.boolean().default(false),
69
+ users: z.array(z.string()).default([]),
70
+ channels: z.array(z.string()).default([]),
71
+ guilds: z.array(z.string()).default([]),
72
+ voice: z.boolean().default(false),
73
+ })
74
+ .default({}),
75
+ strict: z
76
+ .object({
77
+ owner: z.boolean().default(false),
78
+ users: z.array(z.string()).default([]),
79
+ channels: z.array(z.string()).default([]),
80
+ guilds: z.array(z.string()).default([]),
81
+ voice: z.boolean().default(false),
82
+ })
83
+ .default({}),
84
+ permissions: z
85
+ .object({
86
+ user: z.array(z.string()).or(z.null()).default(null),
87
+ client: z.array(z.string()).or(z.null()).default(null),
88
+ dm: z.boolean().default(true),
89
+ })
90
+ .default({}),
91
+ defer: z
92
+ .object({
93
+ reply: z.boolean().optional(),
94
+ ephemeral: z.boolean().optional(),
95
+ fetch: z.boolean().optional(),
96
+ })
97
+ .default({}),
98
+ })
99
+ .parse(options);
100
+ this.name = options.name;
101
+ this.type = options.type;
102
+ this.description = options.description;
103
+ this.usage = options.usage;
104
+ this.info = options.info;
105
+ this.category = options.category;
106
+ this.cooldown = options.cooldown;
107
+ this.channel = options.channel ? (Array.isArray(options.channel) ? options.channel : [options.channel]) : null;
108
+ this.global = options.global;
109
+ this.ignore = options.ignore;
110
+ this.strict = options.strict;
111
+ this.permissions = options.permissions;
112
+ this.defer = options.defer;
113
+ this.client = this.client;
114
+ this.util = this.util;
115
+ }
116
+ /**
117
+ * @description the execution of the command
118
+ * @param interaction - Interaction event emitted on command
119
+ * @param args - The arguments parsed with the command, if any
120
+ */
121
+ async exec(interaction, args) {
122
+ new XernerxLog(this.client).error(`${this.id} doesn't have an execution rule.`);
123
+ return await this.client.emit('commandError', interaction, `${this.id} doesn't have an execution rule.`, this, this.filetype);
124
+ }
121
125
  }
@@ -8,14 +8,14 @@ import { Awaitable, RestEvents } from 'discord.js';
8
8
  * @param {EventOptions} options - The event options.
9
9
  */
10
10
  export default class XernerxEvent<Event extends keyof XernerxClientEvents> {
11
- readonly id: string;
12
- readonly name: Event | keyof RestEvents | string;
13
- readonly emitter?: 'client' | 'process' | 'rest' | string;
14
- readonly type?: 'discord' | 'node' | string;
15
- readonly once?: boolean;
16
- readonly filetype: 'Event';
17
- readonly filepath: string;
18
- readonly client: XernerxClientType;
19
- constructor(id: string, options: XernerxEventOptions);
20
- run(...args: XernerxClientEvents[Event]): Promise<Awaitable<any>>;
11
+ readonly id: string;
12
+ readonly name: Event | keyof RestEvents | string;
13
+ readonly emitter?: 'client' | 'process' | 'rest' | string;
14
+ readonly type?: 'discord' | 'node' | string;
15
+ readonly once?: boolean;
16
+ readonly filetype: 'Event';
17
+ readonly filepath: string;
18
+ readonly client: XernerxClientType;
19
+ constructor(id: string, options: XernerxEventOptions);
20
+ run(...args: XernerxClientEvents[Event]): Promise<Awaitable<any>>;
21
21
  }
@@ -7,21 +7,21 @@ import XernerxLog from '../tools/XernerxLog.js';
7
7
  * @param {EventOptions} options - The event options.
8
8
  */
9
9
  export default class XernerxEvent {
10
- constructor(id, options) {
11
- this.id = id;
12
- z.object({
13
- name: z.string(),
14
- emitter: z.string().optional(),
15
- type: z.string().optional(),
16
- once: z.boolean().optional(),
17
- }).parse(options);
18
- this.name = options.name;
19
- this.emitter = options.emitter || 'client';
20
- this.type = options.type || 'discord';
21
- this.once = options.once || false;
22
- this.client = this.client;
23
- }
24
- async run(...args) {
25
- return new XernerxLog(this.client).error(`${this.id} doesn't have a run rule.`);
26
- }
10
+ constructor(id, options) {
11
+ this.id = id;
12
+ z.object({
13
+ name: z.string(),
14
+ emitter: z.string().optional(),
15
+ type: z.string().optional(),
16
+ once: z.boolean().optional(),
17
+ }).parse(options);
18
+ this.name = options.name;
19
+ this.emitter = options.emitter || 'client';
20
+ this.type = options.type || 'discord';
21
+ this.once = options.once || false;
22
+ this.client = this.client;
23
+ }
24
+ async run(...args) {
25
+ return new XernerxLog(this.client).error(`${this.id} doesn't have a run rule.`);
26
+ }
27
27
  }
@@ -11,19 +11,43 @@ import XernerxMessageCommand from '../build/XernerxMessageCommand.js';
11
11
  * @param {InhibitorOptions} options - The inhibitor options.
12
12
  */
13
13
  export default class XernerxInhibitor {
14
- readonly id: string;
15
- readonly name: string;
16
- readonly type: InhibitorType;
17
- readonly filetype: 'Inhibitor';
18
- readonly filepath: string;
19
- readonly client: XernerxClientType;
20
- constructor(id: string, options: XernerxInhibitorOptions);
21
- pre(interaction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>, args: any): void;
22
- /**
23
- * @description The check rule
24
- * @param interaction - The interaction with the inhibitor, can be message and interaction
25
- * @param args - The arguments parsed with this command
26
- */
27
- check<T extends XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>>(interaction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>, args: (T extends XernerxMessage ? MessageCommandArguments : T extends XernerxSlashInteraction ? SlashCommandArguments : T extends XernerxUserContextInteraction ? ContextCommandArguments<'user' | 'message'> : never) | null, command: XernerxSlashCommand | XernerxMessageCommand | XernerxContextCommand): Promise<any>;
28
- post<T extends XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>>(interaction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>, args: (T extends XernerxMessage ? MessageCommandArguments : T extends XernerxSlashInteraction ? SlashCommandArguments : T extends XernerxUserContextInteraction ? ContextCommandArguments<'user' | 'message'> : never) | null, command: XernerxSlashCommand | XernerxMessageCommand | XernerxContextCommand): Promise<any>;
14
+ readonly id: string;
15
+ readonly name: string;
16
+ readonly type: InhibitorType;
17
+ readonly filetype: 'Inhibitor';
18
+ readonly filepath: string;
19
+ readonly client: XernerxClientType;
20
+ constructor(id: string, options: XernerxInhibitorOptions);
21
+ pre(interaction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>, args: any): void;
22
+ /**
23
+ * @description The check rule
24
+ * @param interaction - The interaction with the inhibitor, can be message and interaction
25
+ * @param args - The arguments parsed with this command
26
+ */
27
+ check<T extends XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>>(
28
+ interaction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>,
29
+ args:
30
+ | (T extends XernerxMessage
31
+ ? MessageCommandArguments
32
+ : T extends XernerxSlashInteraction
33
+ ? SlashCommandArguments
34
+ : T extends XernerxUserContextInteraction
35
+ ? ContextCommandArguments<'user' | 'message'>
36
+ : never)
37
+ | null,
38
+ command: XernerxSlashCommand | XernerxMessageCommand | XernerxContextCommand
39
+ ): Promise<any>;
40
+ post<T extends XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>>(
41
+ interaction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>,
42
+ args:
43
+ | (T extends XernerxMessage
44
+ ? MessageCommandArguments
45
+ : T extends XernerxSlashInteraction
46
+ ? SlashCommandArguments
47
+ : T extends XernerxUserContextInteraction
48
+ ? ContextCommandArguments<'user' | 'message'>
49
+ : never)
50
+ | null,
51
+ command: XernerxSlashCommand | XernerxMessageCommand | XernerxContextCommand
52
+ ): Promise<any>;
29
53
  }
@@ -6,22 +6,22 @@ import { z } from 'zod';
6
6
  * @param {InhibitorOptions} options - The inhibitor options.
7
7
  */
8
8
  export default class XernerxInhibitor {
9
- constructor(id, options) {
10
- this.id = id;
11
- z.object({
12
- name: z.string(),
13
- type: z.string(),
14
- }).parse(options);
15
- this.name = options.name;
16
- this.type = options.type;
17
- this.client = this.client;
18
- }
19
- pre(interaction, args) { }
20
- /**
21
- * @description The check rule
22
- * @param interaction - The interaction with the inhibitor, can be message and interaction
23
- * @param args - The arguments parsed with this command
24
- */
25
- async check(interaction, args, command) { }
26
- async post(interaction, args, command) { }
9
+ constructor(id, options) {
10
+ this.id = id;
11
+ z.object({
12
+ name: z.string(),
13
+ type: z.string(),
14
+ }).parse(options);
15
+ this.name = options.name;
16
+ this.type = options.type;
17
+ this.client = this.client;
18
+ }
19
+ pre(interaction, args) {}
20
+ /**
21
+ * @description The check rule
22
+ * @param interaction - The interaction with the inhibitor, can be message and interaction
23
+ * @param args - The arguments parsed with this command
24
+ */
25
+ async check(interaction, args, command) {}
26
+ async post(interaction, args, command) {}
27
27
  }