xernerx 4.17.4 → 4.17.6

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 +97 -63
  10. package/dist/build/XernerxSlashCommand.js +176 -172
  11. package/dist/client/XernerxClient.d.ts +61 -47
  12. package/dist/client/XernerxClient.js +92 -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 +22 -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 +25 -23
  44. package/dist/tools/XernerxLog.js +139 -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 +195 -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 +7 -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 +6 -3
@@ -3,56 +3,82 @@ import { XernerxClientType, XernerxMessage } from '../types/extenders.js';
3
3
  import { MessageCommandArguments, MessageCommandOptions } from '../types/interfaces.js';
4
4
  import MessageUtil from '../utils/MessageUtil.js';
5
5
  export default class XernerxMessageCommand {
6
- readonly id: string;
7
- readonly name: string;
8
- readonly aliases: string[] | undefined;
9
- readonly regex: RegExp | undefined;
10
- readonly prefix: string | string[] | undefined;
11
- readonly description: string | null | undefined;
12
- readonly usage: string | null | undefined;
13
- readonly info: string | null | undefined;
14
- readonly separator: string | undefined;
15
- readonly args: import("../types/interfaces.js").MessageCommandArgumentOptions[] | undefined;
16
- readonly flags: import("../types/interfaces.js").MessageCommandFlagOptions[] | undefined;
17
- readonly category: string | null | undefined;
18
- readonly cooldown: number | null | undefined;
19
- readonly channel: ("GuildText" | "DM" | "GuildVoice" | "GroupDM" | "GuildCategory" | "GuildAnnouncement" | "AnnouncementThread" | "PublicThread" | "PrivateThread" | "GuildStageVoice" | "GuildDirectory" | "GuildForum" | "GuildMedia" | "GuildNews" | "GuildNewsThread" | "GuildPublicThread" | "GuildPrivateThread")[] | null;
20
- readonly global: boolean | undefined;
21
- readonly ignore: {
22
- owner?: boolean | undefined;
23
- users?: string[] | undefined;
24
- channels?: string[] | undefined;
25
- guilds?: string[] | undefined;
26
- voice?: boolean | undefined;
27
- } | undefined;
28
- readonly strict: {
29
- owner?: boolean | undefined;
30
- users?: string[] | undefined;
31
- channels?: string[] | undefined;
32
- guilds?: string[] | undefined;
33
- voice?: boolean | undefined;
34
- } | undefined;
35
- readonly permissions: {
36
- user?: string[] | import("../main.js").PermissionNames[] | null | undefined;
37
- client?: string[] | import("../main.js").PermissionNames[] | null | undefined;
38
- dm?: boolean | undefined;
39
- } | undefined;
40
- readonly filetype: 'MessageCommand';
41
- readonly filepath: string;
42
- readonly client: XernerxClientType;
43
- snowflake: string | null;
44
- util: MessageUtil;
45
- constructor(id: string, options: MessageCommandOptions);
46
- /**
47
- * @description Checks for conditions before running the command
48
- * @param message - The message event emitted on this command
49
- * @param options - The args and flags parsed on this command
50
- */
51
- conditions(message: XernerxMessage, { args, flags }: MessageCommandArguments): Promise<any>;
52
- /**
53
- * @description Runs the execution rule
54
- * @param message - The message event emitted on this command
55
- * @param options - The args and flags parsed on this command
56
- */
57
- exec(message: XernerxMessage, { args, flags }: MessageCommandArguments): Promise<any>;
6
+ readonly id: string;
7
+ readonly name: string;
8
+ readonly aliases: string[] | undefined;
9
+ readonly regex: RegExp | undefined;
10
+ readonly prefix: string | string[] | undefined;
11
+ readonly description: string | null | undefined;
12
+ readonly usage: string | null | undefined;
13
+ readonly info: string | null | undefined;
14
+ readonly separator: string | undefined;
15
+ readonly args: import('../types/interfaces.js').MessageCommandArgumentOptions[] | undefined;
16
+ readonly flags: import('../types/interfaces.js').MessageCommandFlagOptions[] | undefined;
17
+ readonly category: string | null | undefined;
18
+ readonly cooldown: number | null | undefined;
19
+ readonly channel:
20
+ | (
21
+ | 'GuildText'
22
+ | 'DM'
23
+ | 'GuildVoice'
24
+ | 'GroupDM'
25
+ | 'GuildCategory'
26
+ | 'GuildAnnouncement'
27
+ | 'AnnouncementThread'
28
+ | 'PublicThread'
29
+ | 'PrivateThread'
30
+ | 'GuildStageVoice'
31
+ | 'GuildDirectory'
32
+ | 'GuildForum'
33
+ | 'GuildMedia'
34
+ | 'GuildNews'
35
+ | 'GuildNewsThread'
36
+ | 'GuildPublicThread'
37
+ | 'GuildPrivateThread'
38
+ )[]
39
+ | null;
40
+ readonly global: boolean | undefined;
41
+ readonly ignore:
42
+ | {
43
+ owner?: boolean;
44
+ users?: Array<string>;
45
+ channels?: Array<string>;
46
+ guilds?: Array<string>;
47
+ voice?: boolean;
48
+ }
49
+ | undefined;
50
+ readonly strict:
51
+ | {
52
+ owner?: boolean;
53
+ users?: Array<string>;
54
+ channels?: Array<string>;
55
+ guilds?: Array<string>;
56
+ voice?: boolean;
57
+ }
58
+ | undefined;
59
+ readonly permissions:
60
+ | {
61
+ user?: Array<import('../main.js').PermissionNames> | Array<string> | null;
62
+ client?: Array<import('../main.js').PermissionNames> | Array<string> | null;
63
+ dm?: boolean;
64
+ }
65
+ | undefined;
66
+ readonly filetype: 'MessageCommand';
67
+ readonly filepath: string;
68
+ readonly client: XernerxClientType;
69
+ snowflake: string | null;
70
+ util: MessageUtil;
71
+ constructor(id: string, options: MessageCommandOptions);
72
+ /**
73
+ * @description Checks for conditions before running the command
74
+ * @param message - The message event emitted on this command
75
+ * @param options - The args and flags parsed on this command
76
+ */
77
+ conditions<T = void>(message: XernerxMessage, { args, flags }: MessageCommandArguments): Promise<void | any | T>;
78
+ /**
79
+ * @description Runs the execution rule
80
+ * @param message - The message event emitted on this command
81
+ * @param options - The args and flags parsed on this command
82
+ */
83
+ exec<T = void>(message: XernerxMessage, { args, flags }: MessageCommandArguments): Promise<void | any | T>;
58
84
  }
@@ -2,118 +2,122 @@
2
2
  import { z } from 'zod';
3
3
  import XernerxLog from '../tools/XernerxLog.js';
4
4
  export default class XernerxMessageCommand {
5
- constructor(id, options) {
6
- this.id = id;
7
- this.regex = options.regex;
8
- this.args = options.args;
9
- this.flags = options.flags;
10
- options = z
11
- .object({
12
- name: z.string(),
13
- aliases: z.array(z.string()).default([]),
14
- description: z.string().or(z.null()).default(null),
15
- usage: z.string().or(z.null()).default(null),
16
- info: z.string().or(z.null()).default(null),
17
- category: z.string().or(z.null()).default(null),
18
- cooldown: z.number().or(z.null()).default(null),
19
- global: z.boolean().default(true),
20
- channel: z
21
- .array(z.enum([
22
- 'GuildText',
23
- 'DM',
24
- 'GuildVoice',
25
- 'GroupDM',
26
- 'GuildCategory',
27
- 'GuildAnnouncement',
28
- 'AnnouncementThread',
29
- 'PublicThread',
30
- 'PrivateThread',
31
- 'GuildStageVoice',
32
- 'GuildDirectory',
33
- 'GuildForum',
34
- 'GuildNews',
35
- 'GuildNewsThread',
36
- 'GuildPublicThread',
37
- 'GuildPrivateThread',
38
- ]))
39
- .or(z.enum([
40
- 'GuildText',
41
- 'DM',
42
- 'GuildVoice',
43
- 'GroupDM',
44
- 'GuildCategory',
45
- 'GuildAnnouncement',
46
- 'AnnouncementThread',
47
- 'PublicThread',
48
- 'PrivateThread',
49
- 'GuildStageVoice',
50
- 'GuildDirectory',
51
- 'GuildForum',
52
- 'GuildNews',
53
- 'GuildNewsThread',
54
- 'GuildPublicThread',
55
- 'GuildPrivateThread',
56
- ]))
57
- .or(z.null())
58
- .default(null),
59
- prefix: z.array(z.string()).or(z.string()).default([]),
60
- ignore: z
61
- .object({
62
- owner: z.boolean().default(false),
63
- users: z.array(z.string()).default([]),
64
- channels: z.array(z.string()).default([]),
65
- guilds: z.array(z.string()).default([]),
66
- voice: z.boolean().default(false),
67
- })
68
- .default({}),
69
- strict: z
70
- .object({
71
- owner: z.boolean().default(false),
72
- users: z.array(z.string()).default([]),
73
- channels: z.array(z.string()).default([]),
74
- guilds: z.array(z.string()).default([]),
75
- voice: z.boolean().default(false),
76
- })
77
- .default({}),
78
- permissions: z
79
- .object({
80
- user: z.array(z.string()).or(z.null()).default(null),
81
- client: z.array(z.string()).or(z.null()).default(null),
82
- dm: z.boolean().default(true),
83
- })
84
- .default({}),
85
- })
86
- .parse(options);
87
- this.name = options.name;
88
- this.aliases = options.aliases;
89
- this.prefix = options.prefix;
90
- this.description = options.description;
91
- this.usage = options.usage;
92
- this.info = options.info;
93
- this.category = options.category;
94
- this.cooldown = options.cooldown;
95
- this.channel = options.channel ? (Array.isArray(options.channel) ? options.channel : [options.channel]) : null;
96
- this.global = options.global;
97
- this.ignore = options.ignore;
98
- this.strict = options.strict;
99
- this.separator = options.separator;
100
- this.permissions = options.permissions;
101
- this.client = this.client;
102
- this.util = this.util;
103
- }
104
- /**
105
- * @description Checks for conditions before running the command
106
- * @param message - The message event emitted on this command
107
- * @param options - The args and flags parsed on this command
108
- */
109
- async conditions(message, { args, flags }) { }
110
- /**
111
- * @description Runs the execution rule
112
- * @param message - The message event emitted on this command
113
- * @param options - The args and flags parsed on this command
114
- */
115
- async exec(message, { args, flags }) {
116
- new XernerxLog(this.client).error(`${this.id} doesn't have an execution rule.`);
117
- return await this.client.emit('commandError', message, `${this.id} doesn't have an execution rule.`, this);
118
- }
5
+ constructor(id, options) {
6
+ this.id = id;
7
+ this.regex = options.regex;
8
+ this.args = options.args;
9
+ this.flags = options.flags;
10
+ options = z
11
+ .object({
12
+ name: z.string(),
13
+ aliases: z.array(z.string()).default([]),
14
+ description: z.string().or(z.null()).default(null),
15
+ usage: z.string().or(z.null()).default(null),
16
+ info: z.string().or(z.null()).default(null),
17
+ category: z.string().or(z.null()).default(null),
18
+ cooldown: z.number().or(z.null()).default(null),
19
+ global: z.boolean().default(true),
20
+ channel: z
21
+ .array(
22
+ z.enum([
23
+ 'GuildText',
24
+ 'DM',
25
+ 'GuildVoice',
26
+ 'GroupDM',
27
+ 'GuildCategory',
28
+ 'GuildAnnouncement',
29
+ 'AnnouncementThread',
30
+ 'PublicThread',
31
+ 'PrivateThread',
32
+ 'GuildStageVoice',
33
+ 'GuildDirectory',
34
+ 'GuildForum',
35
+ 'GuildNews',
36
+ 'GuildNewsThread',
37
+ 'GuildPublicThread',
38
+ 'GuildPrivateThread',
39
+ ])
40
+ )
41
+ .or(
42
+ 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
+ )
61
+ .or(z.null())
62
+ .default(null),
63
+ prefix: z.array(z.string()).or(z.string()).default([]),
64
+ ignore: z
65
+ .object({
66
+ owner: z.boolean().default(false),
67
+ users: z.array(z.string()).default([]),
68
+ channels: z.array(z.string()).default([]),
69
+ guilds: z.array(z.string()).default([]),
70
+ voice: z.boolean().default(false),
71
+ })
72
+ .default({}),
73
+ strict: z
74
+ .object({
75
+ owner: z.boolean().default(false),
76
+ users: z.array(z.string()).default([]),
77
+ channels: z.array(z.string()).default([]),
78
+ guilds: z.array(z.string()).default([]),
79
+ voice: z.boolean().default(false),
80
+ })
81
+ .default({}),
82
+ permissions: z
83
+ .object({
84
+ user: z.array(z.string()).or(z.null()).default(null),
85
+ client: z.array(z.string()).or(z.null()).default(null),
86
+ dm: z.boolean().default(true),
87
+ })
88
+ .default({}),
89
+ })
90
+ .parse(options);
91
+ this.name = options.name;
92
+ this.aliases = options.aliases;
93
+ this.prefix = options.prefix;
94
+ this.description = options.description;
95
+ this.usage = options.usage;
96
+ this.info = options.info;
97
+ this.category = options.category;
98
+ this.cooldown = options.cooldown;
99
+ this.channel = options.channel ? (Array.isArray(options.channel) ? options.channel : [options.channel]) : null;
100
+ this.global = options.global;
101
+ this.ignore = options.ignore;
102
+ this.strict = options.strict;
103
+ this.separator = options.separator;
104
+ this.permissions = options.permissions;
105
+ this.client = this.client;
106
+ this.util = this.util;
107
+ }
108
+ /**
109
+ * @description Checks for conditions before running the command
110
+ * @param message - The message event emitted on this command
111
+ * @param options - The args and flags parsed on this command
112
+ */
113
+ async conditions(message, { args, flags }) {}
114
+ /**
115
+ * @description Runs the execution rule
116
+ * @param message - The message event emitted on this command
117
+ * @param options - The args and flags parsed on this command
118
+ */
119
+ async exec(message, { args, flags }) {
120
+ new XernerxLog(this.client).error(`${this.id} doesn't have an execution rule.`);
121
+ return await this.client.emit('commandError', message, `${this.id} doesn't have an execution rule.`, this);
122
+ }
119
123
  }
@@ -1,70 +1,104 @@
1
1
  /** @format */
2
- import Discord from 'discord.js';
2
+ import Discord, { AutocompleteFocusedOption, AutocompleteInteraction } from 'discord.js';
3
3
  import { XernerxClientType, XernerxMessageContextInteraction, XernerxSlashInteraction, XernerxUserContextInteraction } from '../types/extenders.js';
4
4
  import { SlashCommandArguments, SlashCommandOptions } from '../types/interfaces.js';
5
5
  import { XernerxInteraction } from '../types/types.js';
6
6
  import InteractionUtil from '../utils/InteractionUtil.js';
7
7
  export default class XernerxSlashCommand {
8
- readonly id: string;
9
- readonly data: Discord.SlashCommandBuilder;
10
- readonly name: string;
11
- readonly description: string;
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("../types/types.js").PermissionNames[] | null | undefined;
34
- client?: string[] | import("../types/types.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: 'SlashCommand';
43
- readonly filepath: string;
44
- readonly client: XernerxClientType;
45
- snowflake: string | null;
46
- util: InteractionUtil;
47
- constructor(id: string, options: SlashCommandOptions);
48
- /**
49
- * @description autocomplete let's you add choices to string option arguments
50
- * @param interaction - The interaction event emitted on this command
51
- * @param focused - The command option that is in focus
52
- * @param options - The full list of options on the command
53
- */
54
- autocomplete<T>(interaction: XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>, focused: T, options: T[]): Promise<void | any | T>;
55
- /**
56
- * @description Checks for conditions before running the command
57
- * @param interaction - The interaction event emitted on this command
58
- * @param options - The args, group and subcommand parsed on this command
59
- */
60
- conditions<T>(interaction: XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>, { args, subcommand, group }: SlashCommandArguments): Promise<void | any | T>;
61
- /**
62
- * @description Runs the execution rule
63
- * @param interaction - The interaction event emitted on this command
64
- * @param options - The args, group and subcommand parsed on this command
65
- */
66
- exec<T>(interaction: XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>, { args, subcommand, group }: SlashCommandArguments): Promise<void | any | T>;
67
- private addArguments;
68
- private addSubcommands;
69
- private addSubcommandGroups;
8
+ readonly id: string;
9
+ readonly data: Discord.SlashCommandBuilder;
10
+ readonly name: string;
11
+ readonly description: string;
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('../types/types.js').PermissionNames> | Array<string> | null;
59
+ client?: Array<import('../types/types.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: 'SlashCommand';
71
+ readonly filepath: string;
72
+ readonly client: XernerxClientType;
73
+ snowflake: string | null;
74
+ util: InteractionUtil;
75
+ constructor(id: string, options: SlashCommandOptions);
76
+ /**
77
+ * @description autocomplete let's you add choices to string option arguments
78
+ * @param interaction - The interaction event emitted on this command
79
+ * @param focused - The command option that is in focus
80
+ * @param options - The full list of options on the command
81
+ */
82
+ autocomplete<T = void>(interaction: AutocompleteInteraction, focused: AutocompleteFocusedOption, options: any[]): Promise<void | any | T>;
83
+ /**
84
+ * @description Checks for conditions before running the command
85
+ * @param interaction - The interaction event emitted on this command
86
+ * @param options - The args, group and subcommand parsed on this command
87
+ */
88
+ conditions<T = void>(
89
+ interaction: XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>,
90
+ { args, subcommand, group }: SlashCommandArguments
91
+ ): Promise<void | any | T>;
92
+ /**
93
+ * @description Runs the execution rule
94
+ * @param interaction - The interaction event emitted on this command
95
+ * @param options - The args, group and subcommand parsed on this command
96
+ */
97
+ exec<T = void>(
98
+ interaction: XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>,
99
+ { args, subcommand, group }: SlashCommandArguments
100
+ ): Promise<void | any | T>;
101
+ private addArguments;
102
+ private addSubcommands;
103
+ private addSubcommandGroups;
70
104
  }