xernerx 4.5.6 → 4.5.7
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 +46 -44
- package/dist/build/XernerxContextCommand.js +64 -62
- package/dist/build/XernerxEvent.d.ts +16 -14
- package/dist/build/XernerxEvent.js +21 -19
- package/dist/build/XernerxInhibitor.d.ts +19 -17
- package/dist/build/XernerxInhibitor.js +13 -11
- package/dist/build/XernerxMessageCommand.d.ts +44 -42
- package/dist/build/XernerxMessageCommand.js +58 -56
- package/dist/build/XernerxSlashCommand.d.ts +56 -54
- package/dist/build/XernerxSlashCommand.js +110 -108
- package/dist/client/XernerxClient.d.ts +46 -44
- package/dist/client/XernerxClient.js +75 -73
- package/dist/client/XernerxShardClient.d.ts +12 -10
- package/dist/client/XernerxShardClient.js +50 -48
- package/dist/functions/deploy.d.ts +2 -0
- package/dist/functions/deploy.js +32 -30
- package/dist/functions/load.d.ts +2 -0
- package/dist/functions/load.js +29 -27
- package/dist/functions/reload.d.ts +2 -0
- package/dist/functions/reload.js +36 -34
- package/dist/functions/sendWebhook.d.ts +2 -0
- package/dist/functions/sendWebhook.js +12 -10
- package/dist/functions/setPresence.d.ts +2 -0
- package/dist/functions/setPresence.js +19 -17
- package/dist/functions/xernerxUser.d.ts +2 -0
- package/dist/functions/xernerxUser.js +10 -8
- package/dist/handlers/CommandHandler.d.ts +10 -8
- package/dist/handlers/CommandHandler.js +241 -239
- package/dist/handlers/EventHandler.d.ts +4 -2
- package/dist/handlers/EventHandler.js +20 -18
- package/dist/handlers/ExtensionHandler.d.ts +4 -2
- package/dist/handlers/ExtensionHandler.js +19 -17
- package/dist/handlers/Handler.d.ts +9 -7
- package/dist/handlers/Handler.js +33 -31
- package/dist/handlers/InhibitorHandler.d.ts +4 -2
- package/dist/handlers/InhibitorHandler.js +20 -18
- package/dist/handlers/WebhookHandler.d.ts +5 -3
- package/dist/handlers/WebhookHandler.js +48 -46
- package/dist/main.d.ts +28 -26
- package/dist/main.js +28 -26
- package/dist/models/Arguments.d.ts +4 -2
- package/dist/models/Arguments.js +136 -134
- package/dist/tools/XernerxError.d.ts +6 -4
- package/dist/tools/XernerxError.js +10 -8
- package/dist/tools/XernerxLog.d.ts +14 -12
- package/dist/tools/XernerxLog.js +77 -80
- package/dist/types/extenders.d.ts +13 -11
- package/dist/types/extenders.js +2 -0
- package/dist/types/interfaces.d.ts +184 -172
- package/dist/types/interfaces.d.ts.map +1 -1
- package/dist/types/interfaces.js +2 -0
- package/dist/types/interfaces.js.map +1 -1
- package/dist/types/types.d.ts +173 -171
- package/dist/types/types.js +2 -0
- package/dist/utils/ClientUtil.d.ts +8 -5
- package/dist/utils/ClientUtil.d.ts.map +1 -1
- package/dist/utils/ClientUtil.js +45 -26
- package/dist/utils/ClientUtil.js.map +1 -1
- package/dist/utils/InteractionUtil.d.ts +11 -5
- package/dist/utils/InteractionUtil.d.ts.map +1 -1
- package/dist/utils/InteractionUtil.js +98 -8
- package/dist/utils/InteractionUtil.js.map +1 -1
- package/dist/utils/MessageUtil.d.ts +14 -9
- package/dist/utils/MessageUtil.d.ts.map +1 -1
- package/dist/utils/MessageUtil.js +131 -37
- package/dist/utils/MessageUtil.js.map +1 -1
- package/dist/utils/Util.d.ts +5 -3
- package/dist/utils/Util.js +9 -7
- package/dist/validators/commandValidation.d.ts +4 -2
- package/dist/validators/commandValidation.js +44 -42
- package/dist/validators/inhibitorValidations.d.ts +16 -14
- package/dist/validators/inhibitorValidations.js +32 -30
- package/package.json +1 -1
|
@@ -1,51 +1,53 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
import { ContextMenuCommandBuilder } from 'discord.js';
|
|
2
4
|
import XernerxClient from '../client/XernerxClient.js';
|
|
3
5
|
import { XernerxMessageContextInteraction, XernerxUserContextInteraction } from '../types/extenders.js';
|
|
4
6
|
import { ContextCommandArguments, ContextCommandOptions } from '../types/interfaces.js';
|
|
5
7
|
export default class XernerxContextCommand {
|
|
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
|
-
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly data: ContextMenuCommandBuilder;
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly type: 'user' | 'message';
|
|
12
|
+
readonly description: string | null | undefined;
|
|
13
|
+
readonly usage: string | null | undefined;
|
|
14
|
+
readonly info: string | null | undefined;
|
|
15
|
+
readonly category: string | null | undefined;
|
|
16
|
+
readonly cooldown: number | null | undefined;
|
|
17
|
+
readonly ignore:
|
|
18
|
+
| {
|
|
19
|
+
owner?: boolean | undefined;
|
|
20
|
+
users?: string[] | undefined;
|
|
21
|
+
channels?: string[] | undefined;
|
|
22
|
+
guilds?: string[] | undefined;
|
|
23
|
+
}
|
|
24
|
+
| undefined;
|
|
25
|
+
readonly strict:
|
|
26
|
+
| {
|
|
27
|
+
owner?: boolean | undefined;
|
|
28
|
+
users?: string[] | undefined;
|
|
29
|
+
channels?: string[] | undefined;
|
|
30
|
+
guilds?: string[] | undefined;
|
|
31
|
+
}
|
|
32
|
+
| undefined;
|
|
33
|
+
readonly permissions:
|
|
34
|
+
| {
|
|
35
|
+
user?: string[] | import('../main.js').PermissionNames[] | undefined;
|
|
36
|
+
client?: string[] | import('../main.js').PermissionNames[] | undefined;
|
|
37
|
+
dm?: boolean | undefined;
|
|
38
|
+
}
|
|
39
|
+
| undefined;
|
|
40
|
+
readonly defer:
|
|
41
|
+
| {
|
|
42
|
+
reply?: boolean | undefined;
|
|
43
|
+
ephemeral?: boolean | undefined;
|
|
44
|
+
fetchReply?: boolean | undefined;
|
|
45
|
+
}
|
|
46
|
+
| undefined;
|
|
47
|
+
readonly fileType: 'ContextCommand';
|
|
48
|
+
readonly filePath: string;
|
|
49
|
+
readonly client: typeof XernerxClient;
|
|
50
|
+
constructor(id: string, options: ContextCommandOptions);
|
|
51
|
+
exec<T>(interaction: XernerxUserContextInteraction | XernerxMessageContextInteraction, args: ContextCommandArguments<'user' | 'message'>): Promise<void | any | T>;
|
|
50
52
|
}
|
|
51
53
|
//# sourceMappingURL=XernerxContextCommand.d.ts.map
|
|
@@ -1,68 +1,70 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
import { ContextMenuCommandBuilder } from 'discord.js';
|
|
2
4
|
import { z } from 'zod';
|
|
3
5
|
import XernerxClient from '../client/XernerxClient.js';
|
|
4
6
|
export default class XernerxContextCommand {
|
|
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
|
-
|
|
7
|
+
constructor(id, options) {
|
|
8
|
+
this.id = id;
|
|
9
|
+
this.data = new ContextMenuCommandBuilder();
|
|
10
|
+
this.data.setName(options.name);
|
|
11
|
+
this.data.setNameLocalizations(options.nameLocalizations || null);
|
|
12
|
+
this.data.setType(options.type === 'user' ? 2 : 3);
|
|
13
|
+
this.data.setDMPermission(options.permissions?.dm || null);
|
|
14
|
+
options = z
|
|
15
|
+
.object({
|
|
16
|
+
name: z.string(),
|
|
17
|
+
type: z.enum(['user', 'message']),
|
|
18
|
+
description: z.string().or(z.null()).default(null),
|
|
19
|
+
usage: z.string().or(z.null()).default(null),
|
|
20
|
+
info: z.string().or(z.null()).default(null),
|
|
21
|
+
category: z.string().or(z.null()).default(null),
|
|
22
|
+
cooldown: z.number().or(z.null()).default(null),
|
|
23
|
+
ignore: z
|
|
24
|
+
.object({
|
|
25
|
+
owner: z.boolean().default(false),
|
|
26
|
+
users: z.array(z.string()).default([]),
|
|
27
|
+
channels: z.array(z.string()).default([]),
|
|
28
|
+
guilds: z.array(z.string()).default([]),
|
|
29
|
+
})
|
|
30
|
+
.default({}),
|
|
31
|
+
strict: z
|
|
32
|
+
.object({
|
|
33
|
+
owner: z.boolean().default(false),
|
|
34
|
+
users: z.array(z.string()).default([]),
|
|
35
|
+
channels: z.array(z.string()).default([]),
|
|
36
|
+
guilds: z.array(z.string()).default([]),
|
|
37
|
+
})
|
|
38
|
+
.default({}),
|
|
39
|
+
permissions: z
|
|
40
|
+
.object({
|
|
41
|
+
user: z.array(z.string()).default([]),
|
|
42
|
+
client: z.array(z.string()).default([]),
|
|
43
|
+
dm: z.boolean().default(true),
|
|
44
|
+
})
|
|
45
|
+
.default({}),
|
|
46
|
+
defer: z
|
|
47
|
+
.object({
|
|
48
|
+
reply: z.boolean().default(false),
|
|
49
|
+
ephemeral: z.boolean().default(false),
|
|
50
|
+
fetch: z.boolean().default(false),
|
|
51
|
+
})
|
|
52
|
+
.default({}),
|
|
53
|
+
})
|
|
54
|
+
.parse(options);
|
|
55
|
+
this.name = options.name;
|
|
56
|
+
this.type = options.type;
|
|
57
|
+
this.description = options.description;
|
|
58
|
+
this.usage = options.usage;
|
|
59
|
+
this.info = options.info;
|
|
60
|
+
this.category = options.category;
|
|
61
|
+
this.cooldown = options.cooldown;
|
|
62
|
+
this.ignore = options.ignore;
|
|
63
|
+
this.strict = options.strict;
|
|
64
|
+
this.permissions = options.permissions;
|
|
65
|
+
this.defer = options.defer;
|
|
66
|
+
this.client = XernerxClient;
|
|
67
|
+
}
|
|
68
|
+
async exec(interaction, args) {}
|
|
67
69
|
}
|
|
68
70
|
//# sourceMappingURL=XernerxContextCommand.js.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
import XernerxClient from '../client/XernerxClient.js';
|
|
2
4
|
import { XernerxEventOptions } from '../types/interfaces.js';
|
|
3
5
|
import { XernerxEventType } from '../types/types.js';
|
|
@@ -7,19 +9,19 @@ import { XernerxEventType } from '../types/types.js';
|
|
|
7
9
|
* @param {EventOptions} options - The event options.
|
|
8
10
|
*/
|
|
9
11
|
export default class XernerxEvent {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly name: XernerxEventType | string;
|
|
14
|
+
readonly emitter?: 'client' | 'process' | string;
|
|
15
|
+
readonly type?: 'discord' | string;
|
|
16
|
+
readonly once?: boolean;
|
|
17
|
+
readonly fileType: 'Event';
|
|
18
|
+
readonly filePath: string;
|
|
19
|
+
readonly client: typeof XernerxClient;
|
|
20
|
+
constructor(id: string, options: XernerxEventOptions);
|
|
21
|
+
/**
|
|
22
|
+
* @description run your custom event here.
|
|
23
|
+
* TODO - update description
|
|
24
|
+
*/
|
|
25
|
+
run(...args: any): Promise<void>;
|
|
24
26
|
}
|
|
25
27
|
//# sourceMappingURL=XernerxEvent.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
import XernerxClient from '../client/XernerxClient.js';
|
|
3
5
|
/**
|
|
@@ -6,24 +8,24 @@ import XernerxClient from '../client/XernerxClient.js';
|
|
|
6
8
|
* @param {EventOptions} options - The event options.
|
|
7
9
|
*/
|
|
8
10
|
export default class XernerxEvent {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
11
|
+
constructor(id, options) {
|
|
12
|
+
this.id = id;
|
|
13
|
+
z.object({
|
|
14
|
+
name: z.string(),
|
|
15
|
+
emitter: z.string().optional(),
|
|
16
|
+
type: z.string().optional(),
|
|
17
|
+
once: z.boolean().optional(),
|
|
18
|
+
}).parse(options);
|
|
19
|
+
this.name = options.name;
|
|
20
|
+
this.emitter = options.emitter || 'client';
|
|
21
|
+
this.type = options.type || 'discord';
|
|
22
|
+
this.once = options.once || false;
|
|
23
|
+
this.client = XernerxClient;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @description run your custom event here.
|
|
27
|
+
* TODO - update description
|
|
28
|
+
*/
|
|
29
|
+
async run(...args) {}
|
|
28
30
|
}
|
|
29
31
|
//# sourceMappingURL=XernerxEvent.js.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
import XernerxClient from '../client/XernerxClient.js';
|
|
2
4
|
import { XernerxInhibitorOptions, MessageCommandArguments, SlashCommandArguments } from '../types/interfaces.js';
|
|
3
5
|
import { InhibitorType, XernerxInteraction } from '../types/types.js';
|
|
@@ -8,22 +10,22 @@ import { XernerxMessage, XernerxMessageContextInteraction, XernerxSlashInteracti
|
|
|
8
10
|
* @param {InhibitorOptions} options - The inhibitor options.
|
|
9
11
|
*/
|
|
10
12
|
export default class XernerxInhibitor {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly type: InhibitorType;
|
|
16
|
+
readonly fileType: 'Inhibitor';
|
|
17
|
+
readonly filePath: string;
|
|
18
|
+
readonly client: typeof XernerxClient;
|
|
19
|
+
constructor(id: string, options: XernerxInhibitorOptions);
|
|
20
|
+
check<T extends XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>>(
|
|
21
|
+
interaction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>,
|
|
22
|
+
args: T extends XernerxMessage
|
|
23
|
+
? MessageCommandArguments
|
|
24
|
+
: T extends XernerxSlashInteraction
|
|
25
|
+
? SlashCommandArguments
|
|
26
|
+
: T extends XernerxUserContextInteraction
|
|
27
|
+
? XernerxUserContextInteraction
|
|
28
|
+
: XernerxMessageContextInteraction | null
|
|
29
|
+
): Promise<void | any | T>;
|
|
28
30
|
}
|
|
29
31
|
//# sourceMappingURL=XernerxInhibitor.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
import XernerxClient from '../client/XernerxClient.js';
|
|
3
5
|
/**
|
|
@@ -6,16 +8,16 @@ import XernerxClient from '../client/XernerxClient.js';
|
|
|
6
8
|
* @param {InhibitorOptions} options - The inhibitor options.
|
|
7
9
|
*/
|
|
8
10
|
export default class XernerxInhibitor {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
constructor(id, options) {
|
|
12
|
+
this.id = id;
|
|
13
|
+
z.object({
|
|
14
|
+
name: z.string(),
|
|
15
|
+
type: z.string(),
|
|
16
|
+
}).parse(options);
|
|
17
|
+
this.name = options.name;
|
|
18
|
+
this.type = options.type;
|
|
19
|
+
this.client = XernerxClient;
|
|
20
|
+
}
|
|
21
|
+
async check(interaction, args) {}
|
|
20
22
|
}
|
|
21
23
|
//# sourceMappingURL=XernerxInhibitor.js.map
|
|
@@ -1,48 +1,50 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
import XernerxClient from '../client/XernerxClient.js';
|
|
2
4
|
import { XernerxMessage } from '../types/extenders.js';
|
|
3
5
|
import { MessageCommandArguments, MessageCommandOptions } from '../types/interfaces.js';
|
|
4
6
|
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
|
-
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly aliases: string[] | undefined;
|
|
10
|
+
readonly regex: RegExp | undefined;
|
|
11
|
+
readonly prefix: string | string[] | undefined;
|
|
12
|
+
readonly description: string | null | undefined;
|
|
13
|
+
readonly usage: string | null | undefined;
|
|
14
|
+
readonly info: string | null | undefined;
|
|
15
|
+
readonly separator: string | undefined;
|
|
16
|
+
readonly args: import('../types/interfaces.js').MessageCommandArgumentOptions[] | undefined;
|
|
17
|
+
readonly flags: import('../types/interfaces.js').MessageCommandFlagOptions[] | undefined;
|
|
18
|
+
readonly category: string | null | undefined;
|
|
19
|
+
readonly cooldown: number | null | undefined;
|
|
20
|
+
readonly ignore:
|
|
21
|
+
| {
|
|
22
|
+
owner?: boolean | undefined;
|
|
23
|
+
users?: string[] | undefined;
|
|
24
|
+
channels?: string[] | undefined;
|
|
25
|
+
guilds?: string[] | undefined;
|
|
26
|
+
}
|
|
27
|
+
| undefined;
|
|
28
|
+
readonly strict:
|
|
29
|
+
| {
|
|
30
|
+
owner?: boolean | undefined;
|
|
31
|
+
users?: string[] | undefined;
|
|
32
|
+
channels?: string[] | undefined;
|
|
33
|
+
guilds?: string[] | undefined;
|
|
34
|
+
}
|
|
35
|
+
| undefined;
|
|
36
|
+
readonly permissions:
|
|
37
|
+
| {
|
|
38
|
+
user?: string[] | import('../main.js').PermissionNames[] | undefined;
|
|
39
|
+
client?: string[] | import('../main.js').PermissionNames[] | undefined;
|
|
40
|
+
dm?: boolean | undefined;
|
|
41
|
+
}
|
|
42
|
+
| undefined;
|
|
43
|
+
readonly fileType: 'MessageCommand';
|
|
44
|
+
readonly filePath: string;
|
|
45
|
+
readonly client: typeof XernerxClient;
|
|
46
|
+
constructor(id: string, options: MessageCommandOptions);
|
|
47
|
+
conditions<T>(message: XernerxMessage, { args, flags }: MessageCommandArguments): Promise<void | any | T>;
|
|
48
|
+
exec<T>(message: XernerxMessage, { args, flags }: MessageCommandArguments): Promise<void | any | T>;
|
|
47
49
|
}
|
|
48
50
|
//# sourceMappingURL=XernerxMessageCommand.d.ts.map
|
|
@@ -1,61 +1,63 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
import XernerxClient from '../client/XernerxClient.js';
|
|
3
5
|
export default class XernerxMessageCommand {
|
|
4
|
-
|
|
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
|
-
|
|
6
|
+
constructor(id, options) {
|
|
7
|
+
this.id = id;
|
|
8
|
+
this.regex = options.regex;
|
|
9
|
+
this.args = options.args;
|
|
10
|
+
this.flags = options.flags;
|
|
11
|
+
options = z
|
|
12
|
+
.object({
|
|
13
|
+
name: z.string(),
|
|
14
|
+
aliases: z.array(z.string()).default([]),
|
|
15
|
+
description: z.string().or(z.null()).default(null),
|
|
16
|
+
usage: z.string().or(z.null()).default(null),
|
|
17
|
+
info: z.string().or(z.null()).default(null),
|
|
18
|
+
category: z.string().or(z.null()).default(null),
|
|
19
|
+
cooldown: z.number().or(z.null()).default(null),
|
|
20
|
+
prefix: z.array(z.string()).or(z.string()).default([]),
|
|
21
|
+
ignore: z
|
|
22
|
+
.object({
|
|
23
|
+
owner: z.boolean().default(false),
|
|
24
|
+
users: z.array(z.string()).default([]),
|
|
25
|
+
channels: z.array(z.string()).default([]),
|
|
26
|
+
guilds: z.array(z.string()).default([]),
|
|
27
|
+
})
|
|
28
|
+
.default({}),
|
|
29
|
+
strict: z
|
|
30
|
+
.object({
|
|
31
|
+
owner: z.boolean().default(false),
|
|
32
|
+
users: z.array(z.string()).default([]),
|
|
33
|
+
channels: z.array(z.string()).default([]),
|
|
34
|
+
guilds: z.array(z.string()).default([]),
|
|
35
|
+
})
|
|
36
|
+
.default({}),
|
|
37
|
+
permissions: z
|
|
38
|
+
.object({
|
|
39
|
+
user: z.array(z.string()).default([]),
|
|
40
|
+
client: z.array(z.string()).default([]),
|
|
41
|
+
dm: z.boolean().default(true),
|
|
42
|
+
})
|
|
43
|
+
.default({}),
|
|
44
|
+
})
|
|
45
|
+
.parse(options);
|
|
46
|
+
this.name = options.name;
|
|
47
|
+
this.aliases = options.aliases;
|
|
48
|
+
this.prefix = options.prefix;
|
|
49
|
+
this.description = options.description;
|
|
50
|
+
this.usage = options.usage;
|
|
51
|
+
this.info = options.info;
|
|
52
|
+
this.category = options.category;
|
|
53
|
+
this.cooldown = options.cooldown;
|
|
54
|
+
this.ignore = options.ignore;
|
|
55
|
+
this.strict = options.strict;
|
|
56
|
+
this.separator = options.separator;
|
|
57
|
+
this.permissions = options.permissions;
|
|
58
|
+
this.client = XernerxClient;
|
|
59
|
+
}
|
|
60
|
+
async conditions(message, { args, flags }) {}
|
|
61
|
+
async exec(message, { args, flags }) {}
|
|
60
62
|
}
|
|
61
63
|
//# sourceMappingURL=XernerxMessageCommand.js.map
|