xernerx 4.17.3 → 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.
- package/dist/build/XernerxContextCommand.d.ts +75 -47
- package/dist/build/XernerxContextCommand.js +119 -115
- package/dist/build/XernerxEvent.d.ts +10 -10
- package/dist/build/XernerxEvent.js +17 -17
- package/dist/build/XernerxInhibitor.d.ts +39 -15
- package/dist/build/XernerxInhibitor.js +18 -18
- package/dist/build/XernerxMessageCommand.d.ts +78 -52
- package/dist/build/XernerxMessageCommand.js +118 -114
- package/dist/build/XernerxSlashCommand.d.ts +96 -62
- package/dist/build/XernerxSlashCommand.js +176 -172
- package/dist/client/XernerxClient.d.ts +55 -45
- package/dist/client/XernerxClient.js +83 -88
- package/dist/client/XernerxShardClient.d.ts +14 -14
- package/dist/client/XernerxShardClient.js +61 -47
- package/dist/functions/deploy.js +45 -52
- package/dist/functions/load.js +28 -29
- package/dist/functions/reload.js +23 -24
- package/dist/functions/setPresence.d.ts +1 -1
- package/dist/functions/setPresence.js +17 -16
- package/dist/functions/xernerxUser.js +5 -6
- package/dist/handlers/CommandHandler.d.ts +10 -10
- package/dist/handlers/CommandHandler.js +311 -336
- package/dist/handlers/EventHandler.d.ts +3 -3
- package/dist/handlers/EventHandler.js +48 -21
- package/dist/handlers/ExtensionHandler.d.ts +3 -3
- package/dist/handlers/ExtensionHandler.js +23 -23
- package/dist/handlers/Handler.d.ts +19 -14
- package/dist/handlers/Handler.js +46 -50
- package/dist/handlers/InhibitorHandler.d.ts +3 -3
- package/dist/handlers/InhibitorHandler.js +25 -23
- package/dist/handlers/IntegrationHandler.d.ts +6 -6
- package/dist/handlers/IntegrationHandler.js +20 -20
- package/dist/main.d.ts +28 -21
- package/dist/main.js +28 -21
- package/dist/models/Arguments.d.ts +4 -1
- package/dist/models/Arguments.js +134 -149
- package/dist/models/Cooldowns.d.ts +6 -6
- package/dist/models/Cooldowns.js +25 -29
- package/dist/tools/XernerxError.d.ts +4 -4
- package/dist/tools/XernerxError.js +8 -8
- package/dist/tools/XernerxIntents.d.ts +2 -2
- package/dist/tools/XernerxIntents.js +21 -21
- package/dist/tools/XernerxLog.d.ts +23 -23
- package/dist/tools/XernerxLog.js +125 -110
- package/dist/tools/XernerxText.d.ts +23 -23
- package/dist/tools/XernerxText.js +79 -89
- package/dist/types/extenders.d.ts +55 -47
- package/dist/types/interfaces.d.ts +192 -189
- package/dist/types/types.d.ts +104 -5
- package/dist/utils/ClientUtil.d.ts +12 -9
- package/dist/utils/ClientUtil.js +96 -79
- package/dist/utils/InteractionUtil.d.ts +13 -13
- package/dist/utils/InteractionUtil.js +148 -147
- package/dist/utils/MessageUtil.d.ts +14 -14
- package/dist/utils/MessageUtil.js +162 -161
- package/dist/utils/Util.d.ts +4 -4
- package/dist/utils/Util.js +7 -7
- package/dist/validators/commandValidation.d.ts +4 -1
- package/dist/validators/commandValidation.js +157 -114
- package/dist/validators/inhibitorValidations.d.ts +21 -2
- package/dist/validators/inhibitorValidations.js +39 -39
- package/package.json +3 -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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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(message: XernerxMessage, { args, flags }: MessageCommandArguments): Promise<any>;
|
|
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(message: XernerxMessage, { args, flags }: MessageCommandArguments): Promise<any>;
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
}
|
|
@@ -5,66 +5,100 @@ import { SlashCommandArguments, SlashCommandOptions } from '../types/interfaces.
|
|
|
5
5
|
import { XernerxInteraction } from '../types/types.js';
|
|
6
6
|
import InteractionUtil from '../utils/InteractionUtil.js';
|
|
7
7
|
export default class XernerxSlashCommand {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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>(interaction: XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>, focused: T, options: T[]): 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>(
|
|
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>(
|
|
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
|
}
|