xernerx 3.4.3 → 3.5.1
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 +10 -10
- package/dist/build/ContextCommandBuilder.d.ts +60 -42
- package/dist/build/ContextCommandBuilder.js +93 -86
- package/dist/build/EventBuilder.d.ts +21 -17
- package/dist/build/EventBuilder.js +34 -35
- package/dist/build/InhibitorBuilder.d.ts +19 -20
- package/dist/build/InhibitorBuilder.js +27 -27
- package/dist/build/MessageCommandBuilder.d.ts +53 -42
- package/dist/build/MessageCommandBuilder.js +90 -78
- package/dist/build/SlashCommandBuilder.d.ts +58 -40
- package/dist/build/SlashCommandBuilder.js +125 -118
- package/dist/client/XernerxClient.d.ts +28 -28
- package/dist/client/XernerxClient.js +101 -83
- package/dist/handlers/CommandHandler.d.ts +27 -27
- package/dist/handlers/CommandHandler.js +42 -42
- package/dist/handlers/EventHandler.d.ts +13 -13
- package/dist/handlers/EventHandler.js +16 -16
- package/dist/handlers/Handler.d.ts +57 -57
- package/dist/handlers/Handler.js +250 -250
- package/dist/handlers/InhibitorHandler.d.ts +18 -18
- package/dist/handlers/InhibitorHandler.js +21 -21
- package/dist/main.cjs +2023 -0
- package/dist/main.d.ts +30 -30
- package/dist/main.js +42 -42
- package/dist/models/CommandArguments.d.ts +17 -17
- package/dist/models/CommandArguments.js +121 -123
- package/dist/models/Events.d.ts +24 -24
- package/dist/models/Events.js +294 -304
- package/dist/models/Extensions.d.ts +7 -7
- package/dist/models/Extensions.js +23 -23
- package/dist/tools/XernerxError.d.ts +5 -5
- package/dist/tools/XernerxError.js +8 -8
- package/dist/tools/package.d.ts +49 -38
- package/dist/tools/package.js +48 -41
- package/dist/types/enums.d.ts +35 -35
- package/dist/types/enums.js +35 -35
- package/dist/types/interfaces.d.ts +25 -25
- package/dist/types/interfaces.js +1 -1
- package/dist/types/options.d.ts +241 -206
- package/dist/types/options.js +1 -1
- package/dist/types/types.d.ts +34 -32
- package/dist/types/types.js +1 -1
- package/dist/utils/ClientUtil.d.ts +25 -25
- package/dist/utils/ClientUtil.js +222 -218
- package/dist/utils/CommandUtil.d.ts +56 -56
- package/dist/utils/CommandUtil.js +248 -260
- package/dist/validators/CommandValidations.d.ts +7 -7
- package/dist/validators/CommandValidations.js +183 -185
- package/dist/validators/InhibitorValidations.d.ts +11 -11
- package/dist/validators/InhibitorValidations.js +42 -42
- package/dist/validators/Shapes.js +1 -0
- package/package.json +54 -39
- package/dist/build/XContextCommandBuilder.d.ts +0 -40
- package/dist/build/XContextCommandBuilder.js +0 -84
- package/dist/build/XEventBuilder.d.ts +0 -17
- package/dist/build/XEventBuilder.js +0 -35
- package/dist/build/XInhibitorBuilder.d.ts +0 -20
- package/dist/build/XInhibitorBuilder.js +0 -28
- package/dist/build/XMessageCommandBuilder.d.ts +0 -42
- package/dist/build/XMessageCommandBuilder.js +0 -80
- package/dist/build/XSlashCommandBuilder.d.ts +0 -36
- package/dist/build/XSlashCommandBuilder.js +0 -114
- package/dist/models/CommandValidations.d.ts +0 -4
- package/dist/models/CommandValidations.js +0 -183
- package/dist/models/InhibitorValidations.d.ts +0 -12
- package/dist/models/InhibitorValidations.js +0 -42
|
@@ -1,78 +1,90 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import XernerxClient from '../client/XernerxClient.js';
|
|
3
|
-
/**
|
|
4
|
-
* @description - The command builder for message commands.
|
|
5
|
-
* @param {String} id - The unique ID of the command.
|
|
6
|
-
* @param {MessageCommandOptions} options - The command options.
|
|
7
|
-
*/
|
|
8
|
-
export default class MessageCommandBuilder {
|
|
9
|
-
id;
|
|
10
|
-
name;
|
|
11
|
-
aliases;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
channelType;
|
|
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
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import XernerxClient from '../client/XernerxClient.js';
|
|
3
|
+
/**
|
|
4
|
+
* @description - The command builder for message commands.
|
|
5
|
+
* @param {String} id - The unique ID of the command.
|
|
6
|
+
* @param {MessageCommandOptions} options - The command options.
|
|
7
|
+
*/
|
|
8
|
+
export default class MessageCommandBuilder {
|
|
9
|
+
id;
|
|
10
|
+
name;
|
|
11
|
+
aliases;
|
|
12
|
+
separator;
|
|
13
|
+
description;
|
|
14
|
+
info;
|
|
15
|
+
category;
|
|
16
|
+
prefix;
|
|
17
|
+
regex;
|
|
18
|
+
channelType;
|
|
19
|
+
ignore;
|
|
20
|
+
strict;
|
|
21
|
+
permissions;
|
|
22
|
+
cooldown;
|
|
23
|
+
args;
|
|
24
|
+
client;
|
|
25
|
+
constructor(id, options) {
|
|
26
|
+
this.id = id;
|
|
27
|
+
z.object({
|
|
28
|
+
name: z.string(),
|
|
29
|
+
aliases: z.array(z.string()).optional(),
|
|
30
|
+
separator: z.string().min(1).max(1).optional(),
|
|
31
|
+
description: z.string().optional(),
|
|
32
|
+
info: z.string().optional(),
|
|
33
|
+
category: z.string().optional(),
|
|
34
|
+
prefix: z.array(z.string()).or(z.string()).optional(),
|
|
35
|
+
regex: z.unknown(),
|
|
36
|
+
channelType: z.array(z.number()).or(z.number()).optional(),
|
|
37
|
+
cooldown: z.number().optional(),
|
|
38
|
+
ignore: z
|
|
39
|
+
.object({
|
|
40
|
+
owners: z.boolean().optional(),
|
|
41
|
+
users: z.array(z.string()).or(z.string()).optional(),
|
|
42
|
+
channels: z.array(z.string()).or(z.string()).optional(),
|
|
43
|
+
guilds: z.array(z.string()).or(z.string()).optional(),
|
|
44
|
+
})
|
|
45
|
+
.optional(),
|
|
46
|
+
strict: z
|
|
47
|
+
.object({
|
|
48
|
+
owners: z.boolean().optional(),
|
|
49
|
+
users: z.array(z.string()).or(z.string()).optional(),
|
|
50
|
+
channels: z.array(z.string()).or(z.string()).optional(),
|
|
51
|
+
guilds: z.array(z.string()).or(z.string()).optional(),
|
|
52
|
+
})
|
|
53
|
+
.optional(),
|
|
54
|
+
permissions: z
|
|
55
|
+
.object({
|
|
56
|
+
client: z.array(z.string()).optional(),
|
|
57
|
+
users: z.array(z.string()).optional(),
|
|
58
|
+
dm: z.boolean().optional(),
|
|
59
|
+
})
|
|
60
|
+
.optional(),
|
|
61
|
+
}).parse(options);
|
|
62
|
+
this.name = options.name;
|
|
63
|
+
this.aliases = options.aliases;
|
|
64
|
+
this.separator = options.separator || ' ';
|
|
65
|
+
this.description = options.description;
|
|
66
|
+
this.info = options.info;
|
|
67
|
+
this.category = options.category;
|
|
68
|
+
this.prefix = options.prefix ? (Array.isArray(options.prefix) ? options.prefix : [options.prefix]) : [];
|
|
69
|
+
this.regex = options.regex;
|
|
70
|
+
this.channelType = options.channelType;
|
|
71
|
+
this.ignore = options.ignore;
|
|
72
|
+
this.strict = options.strict;
|
|
73
|
+
this.permissions = options.permissions;
|
|
74
|
+
this.cooldown = options.cooldown || 0;
|
|
75
|
+
this.args = options.args || [];
|
|
76
|
+
this.client = XernerxClient;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @param {Message} message - The Discord message event data.
|
|
80
|
+
* @param {object} args - The arguments you created.
|
|
81
|
+
* @description make any preconditions here.
|
|
82
|
+
*/
|
|
83
|
+
async conditions(message, args) { }
|
|
84
|
+
/**
|
|
85
|
+
* @param {Message} message - The Discord message event data.
|
|
86
|
+
* @param {object} args - The arguments you created.
|
|
87
|
+
* @description Make your custom command here.
|
|
88
|
+
*/
|
|
89
|
+
async exec(message, args) { }
|
|
90
|
+
}
|
|
@@ -1,40 +1,58 @@
|
|
|
1
|
-
import Discord, {
|
|
2
|
-
import { SlashCommandOptions } from '../types/options.js';
|
|
3
|
-
import XernerxClient from '../client/XernerxClient.js';
|
|
4
|
-
/**
|
|
5
|
-
* @description - The command builder for slash commands.
|
|
6
|
-
* @param {String} id - The unique ID of the command.
|
|
7
|
-
* @param {SlashCommandOptions} options - The command options.
|
|
8
|
-
*/
|
|
9
|
-
export default class SlashCommandBuilder {
|
|
10
|
-
id: string;
|
|
11
|
-
data: Discord.SlashCommandBuilder;
|
|
12
|
-
name: string;
|
|
13
|
-
description: string;
|
|
14
|
-
info
|
|
15
|
-
category
|
|
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
|
-
|
|
1
|
+
import Discord, { Interaction } from 'discord.js';
|
|
2
|
+
import { SlashCommandOptions } from '../types/options.js';
|
|
3
|
+
import XernerxClient from '../client/XernerxClient.js';
|
|
4
|
+
/**
|
|
5
|
+
* @description - The command builder for slash commands.
|
|
6
|
+
* @param {String} id - The unique ID of the command.
|
|
7
|
+
* @param {SlashCommandOptions} options - The command options.
|
|
8
|
+
*/
|
|
9
|
+
export default class SlashCommandBuilder {
|
|
10
|
+
id: string;
|
|
11
|
+
data: Discord.SlashCommandBuilder;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
info: string | undefined;
|
|
15
|
+
category: string | undefined;
|
|
16
|
+
channelType: Discord.ChannelType | undefined;
|
|
17
|
+
cooldown: number | undefined;
|
|
18
|
+
ignore: {
|
|
19
|
+
owner?: boolean | undefined;
|
|
20
|
+
users?: string[] | undefined;
|
|
21
|
+
channels?: string[] | undefined;
|
|
22
|
+
guilds?: string[] | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
strict: {
|
|
25
|
+
owner?: boolean | undefined;
|
|
26
|
+
users?: string[] | undefined;
|
|
27
|
+
channels?: string[] | undefined;
|
|
28
|
+
guilds?: string[] | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
permissions: {
|
|
31
|
+
client?: string[] | undefined;
|
|
32
|
+
users?: string[] | undefined;
|
|
33
|
+
dm?: boolean | undefined;
|
|
34
|
+
};
|
|
35
|
+
args?: object[];
|
|
36
|
+
subcommands?: object[];
|
|
37
|
+
groups?: object[];
|
|
38
|
+
defer: {
|
|
39
|
+
reply?: boolean | undefined;
|
|
40
|
+
ephemeral?: boolean | undefined;
|
|
41
|
+
fetchReply?: boolean | undefined;
|
|
42
|
+
} | undefined;
|
|
43
|
+
client: typeof XernerxClient;
|
|
44
|
+
constructor(id: string, options: SlashCommandOptions);
|
|
45
|
+
/**
|
|
46
|
+
* TODO - update description
|
|
47
|
+
* @param interaction
|
|
48
|
+
*/
|
|
49
|
+
conditions(interaction: Interaction): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* TODO - update description
|
|
52
|
+
* @param interaction
|
|
53
|
+
*/
|
|
54
|
+
exec(interaction: Interaction): Promise<void>;
|
|
55
|
+
private addArgs;
|
|
56
|
+
private addSubcommands;
|
|
57
|
+
private addSubcommandGroups;
|
|
58
|
+
}
|
|
@@ -1,118 +1,125 @@
|
|
|
1
|
-
import Discord, { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder
|
|
2
|
-
import {
|
|
3
|
-
import XernerxError from '../tools/XernerxError.js';
|
|
4
|
-
import XernerxClient from '../client/XernerxClient.js';
|
|
5
|
-
/**
|
|
6
|
-
* @description - The command builder for slash commands.
|
|
7
|
-
* @param {String} id - The unique ID of the command.
|
|
8
|
-
* @param {SlashCommandOptions} options - The command options.
|
|
9
|
-
*/
|
|
10
|
-
export default class SlashCommandBuilder {
|
|
11
|
-
id;
|
|
12
|
-
data;
|
|
13
|
-
name;
|
|
14
|
-
description;
|
|
15
|
-
info;
|
|
16
|
-
category;
|
|
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
|
-
this.
|
|
71
|
-
this.
|
|
72
|
-
this.
|
|
73
|
-
this.
|
|
74
|
-
this.
|
|
75
|
-
this.
|
|
76
|
-
this.
|
|
77
|
-
this.
|
|
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
|
-
|
|
1
|
+
import Discord, { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from 'discord.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import XernerxError from '../tools/XernerxError.js';
|
|
4
|
+
import XernerxClient from '../client/XernerxClient.js';
|
|
5
|
+
/**
|
|
6
|
+
* @description - The command builder for slash commands.
|
|
7
|
+
* @param {String} id - The unique ID of the command.
|
|
8
|
+
* @param {SlashCommandOptions} options - The command options.
|
|
9
|
+
*/
|
|
10
|
+
export default class SlashCommandBuilder {
|
|
11
|
+
id;
|
|
12
|
+
data;
|
|
13
|
+
name;
|
|
14
|
+
description;
|
|
15
|
+
info;
|
|
16
|
+
category;
|
|
17
|
+
channelType;
|
|
18
|
+
cooldown;
|
|
19
|
+
ignore;
|
|
20
|
+
strict;
|
|
21
|
+
permissions;
|
|
22
|
+
args;
|
|
23
|
+
subcommands;
|
|
24
|
+
groups;
|
|
25
|
+
defer;
|
|
26
|
+
client;
|
|
27
|
+
constructor(id, options) {
|
|
28
|
+
this.id = id;
|
|
29
|
+
this.data = new Discord.SlashCommandBuilder().setName(options.name).setDescription(options.description);
|
|
30
|
+
if (options.args && options?.args?.length > 0) {
|
|
31
|
+
this.addArgs(this.data, options.args);
|
|
32
|
+
}
|
|
33
|
+
if (options.subcommands && options?.subcommands?.length > 0) {
|
|
34
|
+
this.addSubcommands(this.data, options.subcommands);
|
|
35
|
+
}
|
|
36
|
+
if (options.groups && options?.groups?.length > 0) {
|
|
37
|
+
this.addSubcommandGroups(options.groups);
|
|
38
|
+
}
|
|
39
|
+
z.object({
|
|
40
|
+
description: z.string(),
|
|
41
|
+
info: z.string(),
|
|
42
|
+
category: z.string(),
|
|
43
|
+
channelType: z.array(z.number()).or(z.number()),
|
|
44
|
+
cooldown: z.number(),
|
|
45
|
+
ignore: z.object({
|
|
46
|
+
owner: z.boolean(),
|
|
47
|
+
users: z.array(z.string()),
|
|
48
|
+
channels: z.array(z.string()),
|
|
49
|
+
guilds: z.array(z.string()),
|
|
50
|
+
}),
|
|
51
|
+
strict: z.object({
|
|
52
|
+
owner: z.boolean(),
|
|
53
|
+
users: z.array(z.string()),
|
|
54
|
+
channels: z.array(z.string()),
|
|
55
|
+
guilds: z.array(z.string()),
|
|
56
|
+
}),
|
|
57
|
+
permissions: z.object({
|
|
58
|
+
client: z.array(z.string()),
|
|
59
|
+
users: z.array(z.string()),
|
|
60
|
+
dm: z.boolean(),
|
|
61
|
+
}),
|
|
62
|
+
defer: z.object({
|
|
63
|
+
reply: z.boolean(),
|
|
64
|
+
ephemeral: z.boolean(),
|
|
65
|
+
fetch: z.boolean(),
|
|
66
|
+
}),
|
|
67
|
+
})
|
|
68
|
+
.deepPartial()
|
|
69
|
+
.parse(options);
|
|
70
|
+
this.name = options.name;
|
|
71
|
+
this.description = options.description;
|
|
72
|
+
this.info = options.info;
|
|
73
|
+
this.category = options.category;
|
|
74
|
+
this.channelType = options.channelType;
|
|
75
|
+
this.cooldown = options.cooldown;
|
|
76
|
+
this.ignore = options.ignore;
|
|
77
|
+
this.strict = options.strict;
|
|
78
|
+
this.permissions = options.permissions;
|
|
79
|
+
this.defer = options.defer;
|
|
80
|
+
this.client = XernerxClient;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* TODO - update description
|
|
84
|
+
* @param interaction
|
|
85
|
+
*/
|
|
86
|
+
async conditions(interaction) { }
|
|
87
|
+
/**
|
|
88
|
+
* TODO - update description
|
|
89
|
+
* @param interaction
|
|
90
|
+
*/
|
|
91
|
+
async exec(interaction) { }
|
|
92
|
+
addArgs(command, args) {
|
|
93
|
+
const types = ['boolean', 'integer', 'number', 'string', 'user', 'role', 'channel', 'mentionable'];
|
|
94
|
+
for (const argument of args) {
|
|
95
|
+
if (!types.includes(argument.type.toLowerCase()))
|
|
96
|
+
throw new XernerxError(`Expected one of ${types.join(', ')}, received ${argument.type} instead.`);
|
|
97
|
+
let slashArgumentType = `${argument.type.slice(0, 1).toUpperCase()}${argument.type.slice(1).toLowerCase()}`;
|
|
98
|
+
command[`add${slashArgumentType}Option`]((option) => {
|
|
99
|
+
option
|
|
100
|
+
.setName(argument.name)
|
|
101
|
+
.setDescription(argument.description)
|
|
102
|
+
.setRequired(argument.required || false);
|
|
103
|
+
if (argument.choices)
|
|
104
|
+
option.setChoices(...argument?.choices);
|
|
105
|
+
return option;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
addSubcommands(method, subcommands) {
|
|
110
|
+
for (const subcommand of subcommands) {
|
|
111
|
+
let sub = new SlashCommandSubcommandBuilder().setName(subcommand.name).setDescription(subcommand.description);
|
|
112
|
+
if (subcommand.args?.length > 0)
|
|
113
|
+
this.addArgs(sub, subcommand.args);
|
|
114
|
+
method.addSubcommand(sub);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
addSubcommandGroups(groups) {
|
|
118
|
+
for (const group of groups) {
|
|
119
|
+
let subcommandGroup = new SlashCommandSubcommandGroupBuilder().setName(group.name).setDescription(group.description);
|
|
120
|
+
if (group.subcommands?.length > 0)
|
|
121
|
+
this.addSubcommands(subcommandGroup, group.subcommands);
|
|
122
|
+
this.data.addSubcommandGroup(subcommandGroup);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { Client, Collection } from 'discord.js';
|
|
2
|
-
import ExtensionBuilder from 'xernerx-extension-builder';
|
|
3
|
-
import { ClientUtil } from '../utils/ClientUtil.js';
|
|
4
|
-
import { ClientOptions, DiscordOptions, ExtensionOptions, HandlerOptions } from '../types/options.js';
|
|
5
|
-
import { ClientCache, ClientCommands, ClientModules } from '../types/interfaces.js';
|
|
6
|
-
import EventBuilder from '../build/EventBuilder.js';
|
|
7
|
-
import InhibitorBuilder from '../build/InhibitorBuilder.js';
|
|
8
|
-
/**
|
|
9
|
-
* @description - The Client.
|
|
10
|
-
* @param {DiscordOptions} discordOptions - The options for discord.js.
|
|
11
|
-
* @param {ClientOptions} clientOptions - The options for the Xernerx Client.
|
|
12
|
-
* @extends {Client}
|
|
13
|
-
*/
|
|
14
|
-
export default class XernerxClient extends Client {
|
|
15
|
-
settings: ClientOptions;
|
|
16
|
-
commands: ClientCommands;
|
|
17
|
-
cache: ClientCache;
|
|
18
|
-
modules: ClientModules;
|
|
19
|
-
util: ClientUtil;
|
|
20
|
-
handlerOptions: HandlerOptions;
|
|
21
|
-
events: Collection<string, EventBuilder>;
|
|
22
|
-
extensions: Record<string, ExtensionBuilder>;
|
|
23
|
-
inhibitors: Collection<string, InhibitorBuilder>;
|
|
24
|
-
config: object;
|
|
25
|
-
constructor(discordOptions: DiscordOptions, clientOptions: ClientOptions, config?: object);
|
|
26
|
-
register(token: string): void;
|
|
27
|
-
loadAllExtensions(options: ExtensionOptions): Promise<void>;
|
|
28
|
-
}
|
|
1
|
+
import { Client, Collection } from 'discord.js';
|
|
2
|
+
import ExtensionBuilder from 'xernerx-extension-builder';
|
|
3
|
+
import { ClientUtil } from '../utils/ClientUtil.js';
|
|
4
|
+
import { ClientOptions, DiscordOptions, ExtensionOptions, HandlerOptions } from '../types/options.js';
|
|
5
|
+
import { ClientCache, ClientCommands, ClientModules } from '../types/interfaces.js';
|
|
6
|
+
import EventBuilder from '../build/EventBuilder.js';
|
|
7
|
+
import InhibitorBuilder from '../build/InhibitorBuilder.js';
|
|
8
|
+
/**
|
|
9
|
+
* @description - The Client.
|
|
10
|
+
* @param {DiscordOptions} discordOptions - The options for discord.js.
|
|
11
|
+
* @param {ClientOptions} clientOptions - The options for the Xernerx Client.
|
|
12
|
+
* @extends {Client}
|
|
13
|
+
*/
|
|
14
|
+
export default class XernerxClient extends Client {
|
|
15
|
+
settings: ClientOptions;
|
|
16
|
+
commands: ClientCommands;
|
|
17
|
+
cache: ClientCache;
|
|
18
|
+
modules: ClientModules;
|
|
19
|
+
util: ClientUtil;
|
|
20
|
+
handlerOptions: HandlerOptions;
|
|
21
|
+
events: Collection<string, EventBuilder>;
|
|
22
|
+
extensions: Record<string, ExtensionBuilder>;
|
|
23
|
+
inhibitors: Collection<string, InhibitorBuilder>;
|
|
24
|
+
config: object;
|
|
25
|
+
constructor(discordOptions: DiscordOptions, clientOptions: ClientOptions, config?: object);
|
|
26
|
+
register(token: string): void;
|
|
27
|
+
loadAllExtensions(options: ExtensionOptions): Promise<void>;
|
|
28
|
+
}
|