xernerx 4.5.6 → 4.5.8
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 -46
- package/dist/build/XernerxContextCommand.d.ts.map +1 -1
- package/dist/build/XernerxContextCommand.js +63 -63
- package/dist/build/XernerxContextCommand.js.map +1 -1
- package/dist/build/XernerxEvent.d.ts +16 -15
- package/dist/build/XernerxEvent.d.ts.map +1 -1
- package/dist/build/XernerxEvent.js +20 -20
- package/dist/build/XernerxEvent.js.map +1 -1
- package/dist/build/XernerxInhibitor.d.ts +19 -19
- package/dist/build/XernerxInhibitor.d.ts.map +1 -1
- package/dist/build/XernerxInhibitor.js +12 -12
- package/dist/build/XernerxInhibitor.js.map +1 -1
- package/dist/build/XernerxMessageCommand.d.ts +44 -44
- package/dist/build/XernerxMessageCommand.d.ts.map +1 -1
- package/dist/build/XernerxMessageCommand.js +57 -57
- package/dist/build/XernerxMessageCommand.js.map +1 -1
- package/dist/build/XernerxSlashCommand.d.ts +56 -56
- package/dist/build/XernerxSlashCommand.d.ts.map +1 -1
- package/dist/build/XernerxSlashCommand.js +109 -109
- package/dist/build/XernerxSlashCommand.js.map +1 -1
- package/dist/client/XernerxClient.d.ts +45 -44
- package/dist/client/XernerxClient.d.ts.map +1 -1
- package/dist/client/XernerxClient.js +74 -73
- package/dist/client/XernerxClient.js.map +1 -1
- package/dist/client/XernerxShardClient.d.ts +11 -10
- package/dist/client/XernerxShardClient.d.ts.map +1 -1
- package/dist/client/XernerxShardClient.js +49 -48
- package/dist/client/XernerxShardClient.js.map +1 -1
- package/dist/functions/deploy.d.ts +1 -0
- package/dist/functions/deploy.d.ts.map +1 -1
- package/dist/functions/deploy.js +31 -30
- package/dist/functions/deploy.js.map +1 -1
- package/dist/functions/load.d.ts +1 -0
- package/dist/functions/load.d.ts.map +1 -1
- package/dist/functions/load.js +28 -27
- package/dist/functions/load.js.map +1 -1
- package/dist/functions/reload.d.ts +1 -0
- package/dist/functions/reload.d.ts.map +1 -1
- package/dist/functions/reload.js +35 -34
- package/dist/functions/reload.js.map +1 -1
- package/dist/functions/sendWebhook.d.ts +1 -0
- package/dist/functions/sendWebhook.d.ts.map +1 -1
- package/dist/functions/sendWebhook.js +11 -10
- package/dist/functions/sendWebhook.js.map +1 -1
- package/dist/functions/setPresence.d.ts +1 -0
- package/dist/functions/setPresence.d.ts.map +1 -1
- package/dist/functions/setPresence.js +18 -17
- package/dist/functions/setPresence.js.map +1 -1
- package/dist/functions/xernerxUser.d.ts +1 -0
- package/dist/functions/xernerxUser.d.ts.map +1 -1
- package/dist/functions/xernerxUser.js +6 -8
- package/dist/functions/xernerxUser.js.map +1 -1
- package/dist/handlers/CommandHandler.d.ts +9 -8
- package/dist/handlers/CommandHandler.d.ts.map +1 -1
- package/dist/handlers/CommandHandler.js +240 -239
- package/dist/handlers/CommandHandler.js.map +1 -1
- package/dist/handlers/EventHandler.d.ts +3 -2
- package/dist/handlers/EventHandler.d.ts.map +1 -1
- package/dist/handlers/EventHandler.js +19 -18
- package/dist/handlers/EventHandler.js.map +1 -1
- package/dist/handlers/ExtensionHandler.d.ts +3 -2
- package/dist/handlers/ExtensionHandler.d.ts.map +1 -1
- package/dist/handlers/ExtensionHandler.js +18 -17
- package/dist/handlers/ExtensionHandler.js.map +1 -1
- package/dist/handlers/Handler.d.ts +8 -7
- package/dist/handlers/Handler.d.ts.map +1 -1
- package/dist/handlers/Handler.js +32 -31
- package/dist/handlers/Handler.js.map +1 -1
- package/dist/handlers/InhibitorHandler.d.ts +3 -2
- package/dist/handlers/InhibitorHandler.d.ts.map +1 -1
- package/dist/handlers/InhibitorHandler.js +19 -18
- package/dist/handlers/InhibitorHandler.js.map +1 -1
- package/dist/handlers/WebhookHandler.d.ts +4 -3
- package/dist/handlers/WebhookHandler.d.ts.map +1 -1
- package/dist/handlers/WebhookHandler.js +47 -46
- package/dist/handlers/WebhookHandler.js.map +1 -1
- package/dist/main.d.ts +27 -26
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +27 -26
- package/dist/main.js.map +1 -1
- package/dist/models/Arguments.d.ts +3 -2
- package/dist/models/Arguments.d.ts.map +1 -1
- package/dist/models/Arguments.js +135 -134
- package/dist/models/Arguments.js.map +1 -1
- package/dist/tools/XernerxError.d.ts +5 -4
- package/dist/tools/XernerxError.d.ts.map +1 -1
- package/dist/tools/XernerxError.js +9 -8
- package/dist/tools/XernerxError.js.map +1 -1
- package/dist/tools/XernerxLog.d.ts +13 -12
- package/dist/tools/XernerxLog.d.ts.map +1 -1
- package/dist/tools/XernerxLog.js +76 -80
- package/dist/tools/XernerxLog.js.map +1 -1
- package/dist/types/extenders.d.ts +43 -12
- package/dist/types/extenders.d.ts.map +1 -1
- package/dist/types/extenders.js +1 -0
- package/dist/types/extenders.js.map +1 -1
- package/dist/types/interfaces.d.ts +186 -172
- package/dist/types/interfaces.d.ts.map +1 -1
- package/dist/types/interfaces.js +1 -0
- package/dist/types/interfaces.js.map +1 -1
- package/dist/types/types.d.ts +172 -171
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/types.js +1 -0
- package/dist/types/types.js.map +1 -1
- package/dist/utils/ClientUtil.d.ts +13 -6
- package/dist/utils/ClientUtil.d.ts.map +1 -1
- package/dist/utils/ClientUtil.js +56 -26
- package/dist/utils/ClientUtil.js.map +1 -1
- package/dist/utils/InteractionUtil.d.ts +10 -5
- package/dist/utils/InteractionUtil.d.ts.map +1 -1
- package/dist/utils/InteractionUtil.js +97 -8
- package/dist/utils/InteractionUtil.js.map +1 -1
- package/dist/utils/MessageUtil.d.ts +13 -9
- package/dist/utils/MessageUtil.d.ts.map +1 -1
- package/dist/utils/MessageUtil.js +130 -37
- package/dist/utils/MessageUtil.js.map +1 -1
- package/dist/utils/Util.d.ts +4 -3
- package/dist/utils/Util.d.ts.map +1 -1
- package/dist/utils/Util.js +8 -7
- package/dist/utils/Util.js.map +1 -1
- package/dist/validators/commandValidation.d.ts +3 -2
- package/dist/validators/commandValidation.d.ts.map +1 -1
- package/dist/validators/commandValidation.js +43 -42
- package/dist/validators/commandValidation.js.map +1 -1
- package/dist/validators/inhibitorValidations.d.ts +15 -14
- package/dist/validators/inhibitorValidations.d.ts.map +1 -1
- package/dist/validators/inhibitorValidations.js +31 -30
- package/dist/validators/inhibitorValidations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
|
+
/** @format */
|
|
1
2
|
import { ContextMenuCommandBuilder } from 'discord.js';
|
|
2
|
-
import
|
|
3
|
-
import { XernerxMessageContextInteraction, XernerxUserContextInteraction } from '../types/extenders.js';
|
|
3
|
+
import { XernerxMessageContextInteraction, XernerxUserContextInteraction, XernerxClientType } from '../types/extenders.js';
|
|
4
4
|
import { ContextCommandArguments, ContextCommandOptions } from '../types/interfaces.js';
|
|
5
5
|
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
|
-
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly data: ContextMenuCommandBuilder;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly type: 'user' | 'message';
|
|
10
|
+
readonly description: string | null | undefined;
|
|
11
|
+
readonly usage: string | null | undefined;
|
|
12
|
+
readonly info: string | null | undefined;
|
|
13
|
+
readonly category: string | null | undefined;
|
|
14
|
+
readonly cooldown: number | null | undefined;
|
|
15
|
+
readonly ignore:
|
|
16
|
+
| {
|
|
17
|
+
owner?: boolean | undefined;
|
|
18
|
+
users?: string[] | undefined;
|
|
19
|
+
channels?: string[] | undefined;
|
|
20
|
+
guilds?: string[] | undefined;
|
|
21
|
+
}
|
|
22
|
+
| undefined;
|
|
23
|
+
readonly strict:
|
|
24
|
+
| {
|
|
25
|
+
owner?: boolean | undefined;
|
|
26
|
+
users?: string[] | undefined;
|
|
27
|
+
channels?: string[] | undefined;
|
|
28
|
+
guilds?: string[] | undefined;
|
|
29
|
+
}
|
|
30
|
+
| undefined;
|
|
31
|
+
readonly permissions:
|
|
32
|
+
| {
|
|
33
|
+
user?: string[] | import('../main.js').PermissionNames[] | undefined;
|
|
34
|
+
client?: string[] | import('../main.js').PermissionNames[] | undefined;
|
|
35
|
+
dm?: boolean | undefined;
|
|
36
|
+
}
|
|
37
|
+
| undefined;
|
|
38
|
+
readonly defer:
|
|
39
|
+
| {
|
|
40
|
+
reply?: boolean | undefined;
|
|
41
|
+
ephemeral?: boolean | undefined;
|
|
42
|
+
fetchReply?: boolean | undefined;
|
|
43
|
+
}
|
|
44
|
+
| undefined;
|
|
45
|
+
readonly fileType: 'ContextCommand';
|
|
46
|
+
readonly filePath: string;
|
|
47
|
+
readonly client: XernerxClientType;
|
|
48
|
+
constructor(id: string, options: ContextCommandOptions);
|
|
49
|
+
exec<T>(interaction: XernerxUserContextInteraction | XernerxMessageContextInteraction, args: ContextCommandArguments<'user' | 'message'>): Promise<void | any | T>;
|
|
50
50
|
}
|
|
51
51
|
//# sourceMappingURL=XernerxContextCommand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XernerxContextCommand.d.ts","sourceRoot":"","sources":["../../src/build/XernerxContextCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAGvD,OAAO,
|
|
1
|
+
{"version":3,"file":"XernerxContextCommand.d.ts","sourceRoot":"","sources":["../../src/build/XernerxContextCommand.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAGvD,OAAO,EAAE,gCAAgC,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC3H,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAExF,MAAM,CAAC,OAAO,OAAO,qBAAqB;IACzC,SAAwB,EAAE,SAAC;IAC3B,SAAwB,IAAI,4BAAC;IAC7B,SAAwB,IAAI,SAAC;IAC7B,SAAwB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACjD,SAAwB,WAAW,4BAAC;IACpC,SAAwB,KAAK,4BAAC;IAC9B,SAAwB,IAAI,4BAAC;IAC7B,SAAwB,QAAQ,4BAAC;IACjC,SAAwB,QAAQ,4BAAC;IACjC,SAAwB,MAAM;;;;;kBAAC;IAC/B,SAAwB,MAAM;;;;;kBAAC;IAC/B,SAAwB,WAAW;;;;kBAAC;IACpC,SAAwB,KAAK;;;;kBAAC;IAC9B,SAAwB,QAAQ,EAAE,gBAAgB,CAAC;IACnD,SAAwB,QAAQ,EAAE,MAAM,CAAC;IACzC,SAAwB,MAAM,EAAE,iBAAiB,CAAC;gBAE/B,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB;IAgFhD,IAAI,CAAC,CAAC,EAAE,WAAW,EAAE,6BAA6B,GAAG,gCAAgC,EAAE,IAAI,EAAE,uBAAuB,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;CAC/K"}
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
+
/** @format */
|
|
1
2
|
import { ContextMenuCommandBuilder } from 'discord.js';
|
|
2
3
|
import { z } from 'zod';
|
|
3
|
-
import XernerxClient from '../client/XernerxClient.js';
|
|
4
4
|
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
|
-
|
|
5
|
+
constructor(id, options) {
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.data = new ContextMenuCommandBuilder();
|
|
8
|
+
this.data.setName(options.name);
|
|
9
|
+
this.data.setNameLocalizations(options.nameLocalizations || null);
|
|
10
|
+
this.data.setType(options.type === 'user' ? 2 : 3);
|
|
11
|
+
this.data.setDMPermission(options.permissions?.dm || null);
|
|
12
|
+
options = z
|
|
13
|
+
.object({
|
|
14
|
+
name: z.string(),
|
|
15
|
+
type: z.enum(['user', 'message']),
|
|
16
|
+
description: z.string().or(z.null()).default(null),
|
|
17
|
+
usage: z.string().or(z.null()).default(null),
|
|
18
|
+
info: z.string().or(z.null()).default(null),
|
|
19
|
+
category: z.string().or(z.null()).default(null),
|
|
20
|
+
cooldown: z.number().or(z.null()).default(null),
|
|
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
|
+
defer: z
|
|
45
|
+
.object({
|
|
46
|
+
reply: z.boolean().default(false),
|
|
47
|
+
ephemeral: z.boolean().default(false),
|
|
48
|
+
fetch: z.boolean().default(false),
|
|
49
|
+
})
|
|
50
|
+
.default({}),
|
|
51
|
+
})
|
|
52
|
+
.parse(options);
|
|
53
|
+
this.name = options.name;
|
|
54
|
+
this.type = options.type;
|
|
55
|
+
this.description = options.description;
|
|
56
|
+
this.usage = options.usage;
|
|
57
|
+
this.info = options.info;
|
|
58
|
+
this.category = options.category;
|
|
59
|
+
this.cooldown = options.cooldown;
|
|
60
|
+
this.ignore = options.ignore;
|
|
61
|
+
this.strict = options.strict;
|
|
62
|
+
this.permissions = options.permissions;
|
|
63
|
+
this.defer = options.defer;
|
|
64
|
+
this.client = this.client;
|
|
65
|
+
}
|
|
66
|
+
async exec(interaction, args) {}
|
|
67
67
|
}
|
|
68
68
|
//# sourceMappingURL=XernerxContextCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XernerxContextCommand.js","sourceRoot":"","sources":["../../src/build/XernerxContextCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"XernerxContextCommand.js","sourceRoot":"","sources":["../../src/build/XernerxContextCommand.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAkBzC,YAAmB,EAAU,EAAE,OAA8B;QAC5D,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QAEb,IAAI,CAAC,IAAI,GAAG,IAAI,yBAAyB,EAAE,CAAC;QAE5C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEhC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,iBAAiB,IAAI,IAAI,CAAC,CAAC;QAElE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAEnD,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,IAAI,IAAI,CAAC,CAAC;QAE3D,OAAO,GAAG,CAAC;aACT,MAAM,CAAC;YACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;YAChB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;YACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAA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AEzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAEjC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAEjC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAE7B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAE7B,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAEvC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAE3B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,IAAI,CAAI,WAA6E,EAAE,IAAiD,IAA4B,CAAC;CAClL","sourcesContent":["/** @format */\n\nimport { ContextMenuCommandBuilder } from 'discord.js';\nimport { z } from 'zod';\n\nimport { XernerxMessageContextInteraction, XernerxUserContextInteraction, XernerxClientType } from '../types/extenders.js';\nimport { ContextCommandArguments, ContextCommandOptions } from '../types/interfaces.js';\n\nexport default class XernerxContextCommand {\n\tpublic declare readonly id;\n\tpublic declare readonly data;\n\tpublic declare readonly name;\n\tpublic declare readonly type: 'user' | 'message';\n\tpublic declare readonly description;\n\tpublic declare readonly usage;\n\tpublic declare readonly info;\n\tpublic declare readonly category;\n\tpublic declare readonly cooldown;\n\tpublic declare readonly ignore;\n\tpublic declare readonly strict;\n\tpublic declare readonly permissions;\n\tpublic declare readonly defer;\n\tpublic declare readonly fileType: 'ContextCommand';\n\tpublic declare readonly filePath: string;\n\tpublic declare readonly client: XernerxClientType;\n\n\tpublic constructor(id: string, options: ContextCommandOptions) {\n\t\tthis.id = id;\n\n\t\tthis.data = new ContextMenuCommandBuilder();\n\n\t\tthis.data.setName(options.name);\n\n\t\tthis.data.setNameLocalizations(options.nameLocalizations || null);\n\n\t\tthis.data.setType(options.type === 'user' ? 2 : 3);\n\n\t\tthis.data.setDMPermission(options.permissions?.dm || null);\n\n\t\toptions = z\n\t\t\t.object({\n\t\t\t\tname: z.string(),\n\t\t\t\ttype: z.enum(['user', 'message']),\n\t\t\t\tdescription: z.string().or(z.null()).default(null),\n\t\t\t\tusage: z.string().or(z.null()).default(null),\n\t\t\t\tinfo: z.string().or(z.null()).default(null),\n\t\t\t\tcategory: z.string().or(z.null()).default(null),\n\t\t\t\tcooldown: z.number().or(z.null()).default(null),\n\t\t\t\tignore: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\towner: z.boolean().default(false),\n\t\t\t\t\t\tusers: z.array(z.string()).default([]),\n\t\t\t\t\t\tchannels: z.array(z.string()).default([]),\n\t\t\t\t\t\tguilds: z.array(z.string()).default([]),\n\t\t\t\t\t})\n\t\t\t\t\t.default({}),\n\t\t\t\tstrict: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\towner: z.boolean().default(false),\n\t\t\t\t\t\tusers: z.array(z.string()).default([]),\n\t\t\t\t\t\tchannels: z.array(z.string()).default([]),\n\t\t\t\t\t\tguilds: z.array(z.string()).default([]),\n\t\t\t\t\t})\n\t\t\t\t\t.default({}),\n\t\t\t\tpermissions: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\tuser: z.array(z.string()).default([]),\n\t\t\t\t\t\tclient: z.array(z.string()).default([]),\n\t\t\t\t\t\tdm: z.boolean().default(true),\n\t\t\t\t\t})\n\t\t\t\t\t.default({}),\n\t\t\t\tdefer: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\treply: z.boolean().default(false),\n\t\t\t\t\t\tephemeral: z.boolean().default(false),\n\t\t\t\t\t\tfetch: z.boolean().default(false),\n\t\t\t\t\t})\n\t\t\t\t\t.default({}),\n\t\t\t})\n\t\t\t.parse(options);\n\n\t\tthis.name = options.name;\n\n\t\tthis.type = options.type;\n\n\t\tthis.description = options.description;\n\n\t\tthis.usage = options.usage;\n\n\t\tthis.info = options.info;\n\n\t\tthis.category = options.category;\n\n\t\tthis.cooldown = options.cooldown;\n\n\t\tthis.ignore = options.ignore;\n\n\t\tthis.strict = options.strict;\n\n\t\tthis.permissions = options.permissions;\n\n\t\tthis.defer = options.defer;\n\n\t\tthis.client = this.client;\n\t}\n\n\tpublic async exec<T>(interaction: XernerxUserContextInteraction | XernerxMessageContextInteraction, args: ContextCommandArguments<'user' | 'message'>): Promise<void | any | T> {}\n}\n"]}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/** @format */
|
|
2
2
|
import { XernerxEventOptions } from '../types/interfaces.js';
|
|
3
3
|
import { XernerxEventType } from '../types/types.js';
|
|
4
|
+
import { XernerxClientType } from '../main.js';
|
|
4
5
|
/**
|
|
5
6
|
* @description - The event builder for events.
|
|
6
7
|
* @param {String} id - The unique ID of the event.
|
|
7
8
|
* @param {EventOptions} options - The event options.
|
|
8
9
|
*/
|
|
9
10
|
export default class XernerxEvent {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly name: XernerxEventType | string;
|
|
13
|
+
readonly emitter?: 'client' | 'process' | string;
|
|
14
|
+
readonly type?: 'discord' | string;
|
|
15
|
+
readonly once?: boolean;
|
|
16
|
+
readonly fileType: 'Event';
|
|
17
|
+
readonly filePath: string;
|
|
18
|
+
readonly client: XernerxClientType;
|
|
19
|
+
constructor(id: string, options: XernerxEventOptions);
|
|
20
|
+
/**
|
|
21
|
+
* @description run your custom event here.
|
|
22
|
+
* TODO - update description
|
|
23
|
+
*/
|
|
24
|
+
run(...args: any): Promise<void>;
|
|
24
25
|
}
|
|
25
26
|
//# sourceMappingURL=XernerxEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XernerxEvent.d.ts","sourceRoot":"","sources":["../../src/build/XernerxEvent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"XernerxEvent.d.ts","sourceRoot":"","sources":["../../src/build/XernerxEvent.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;IAChC,SAAwB,EAAE,EAAE,MAAM,CAAC;IACnC,SAAwB,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAAC;IACxD,SAAwB,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IAChE,SAAwB,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAClD,SAAwB,IAAI,CAAC,EAAE,OAAO,CAAC;IACvC,SAAwB,QAAQ,EAAE,OAAO,CAAC;IAC1C,SAAwB,QAAQ,EAAE,MAAM,CAAC;IACzC,SAAwB,MAAM,EAAE,iBAAiB,CAAC;gBAE/B,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB;IAoB3D;;;OAGG;IACU,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG;CAC7B"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
+
/** @format */
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import XernerxClient from '../client/XernerxClient.js';
|
|
3
3
|
/**
|
|
4
4
|
* @description - The event builder for events.
|
|
5
5
|
* @param {String} id - The unique ID of the event.
|
|
6
6
|
* @param {EventOptions} options - The event options.
|
|
7
7
|
*/
|
|
8
8
|
export default class XernerxEvent {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
constructor(id, options) {
|
|
10
|
+
this.id = id;
|
|
11
|
+
z.object({
|
|
12
|
+
name: z.string(),
|
|
13
|
+
emitter: z.string().optional(),
|
|
14
|
+
type: z.string().optional(),
|
|
15
|
+
once: z.boolean().optional(),
|
|
16
|
+
}).parse(options);
|
|
17
|
+
this.name = options.name;
|
|
18
|
+
this.emitter = options.emitter || 'client';
|
|
19
|
+
this.type = options.type || 'discord';
|
|
20
|
+
this.once = options.once || false;
|
|
21
|
+
this.client = this.client;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @description run your custom event here.
|
|
25
|
+
* TODO - update description
|
|
26
|
+
*/
|
|
27
|
+
async run(...args) {}
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=XernerxEvent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XernerxEvent.js","sourceRoot":"","sources":["../../src/build/XernerxEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"XernerxEvent.js","sourceRoot":"","sources":["../../src/build/XernerxEvent.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;IAUhC,YAAmB,EAAU,EAAE,OAA4B;QAC1D,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QAEb,CAAC,CAAC,MAAM,CAAC;YACR,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;YAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC3B,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;SAC5B,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAElB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QAEzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,QAAQ,CAAC;QAE3C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,SAAS,CAAC;QAEtC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAAC;QAElC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3B,CAAC;IACD;;;OAGG;IACI,KAAK,CAAC,GAAG,CAAC,GAAG,IAAS,IAAG,CAAC;CACjC","sourcesContent":["/** @format */\n\nimport { z } from 'zod';\n\nimport { XernerxEventOptions } from '../types/interfaces.js';\nimport { XernerxEventType } from '../types/types.js';\nimport { XernerxClientType } from '../main.js';\n\n/**\n * @description - The event builder for events.\n * @param {String} id - The unique ID of the event.\n * @param {EventOptions} options - The event options.\n */\nexport default class XernerxEvent {\n\tpublic declare readonly id: string;\n\tpublic declare readonly name: XernerxEventType | string;\n\tpublic declare readonly emitter?: 'client' | 'process' | string;\n\tpublic declare readonly type?: 'discord' | string;\n\tpublic declare readonly once?: boolean;\n\tpublic declare readonly fileType: 'Event';\n\tpublic declare readonly filePath: string;\n\tpublic declare readonly client: XernerxClientType;\n\n\tpublic constructor(id: string, options: XernerxEventOptions) {\n\t\tthis.id = id;\n\n\t\tz.object({\n\t\t\tname: z.string(),\n\t\t\temitter: z.string().optional(),\n\t\t\ttype: z.string().optional(),\n\t\t\tonce: z.boolean().optional(),\n\t\t}).parse(options);\n\n\t\tthis.name = options.name;\n\n\t\tthis.emitter = options.emitter || 'client';\n\n\t\tthis.type = options.type || 'discord';\n\n\t\tthis.once = options.once || false;\n\n\t\tthis.client = this.client;\n\t}\n\t/**\n\t * @description run your custom event here.\n\t * TODO - update description\n\t */\n\tpublic async run(...args: any) {}\n}\n"]}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
/** @format */
|
|
2
2
|
import { XernerxInhibitorOptions, MessageCommandArguments, SlashCommandArguments } from '../types/interfaces.js';
|
|
3
3
|
import { InhibitorType, XernerxInteraction } from '../types/types.js';
|
|
4
|
-
import { XernerxMessage, XernerxMessageContextInteraction, XernerxSlashInteraction, XernerxUserContextInteraction } from '../types/extenders.js';
|
|
4
|
+
import { XernerxClientType, XernerxMessage, XernerxMessageContextInteraction, XernerxSlashInteraction, XernerxUserContextInteraction } from '../types/extenders.js';
|
|
5
5
|
/**
|
|
6
6
|
* @description - The inhibitor builder for inhibitors.
|
|
7
7
|
* @param {String} id - The unique ID of the inhibitor.
|
|
8
8
|
* @param {InhibitorOptions} options - The inhibitor options.
|
|
9
9
|
*/
|
|
10
10
|
export default class XernerxInhibitor {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly type: InhibitorType;
|
|
14
|
+
readonly fileType: 'Inhibitor';
|
|
15
|
+
readonly filePath: string;
|
|
16
|
+
readonly client: XernerxClientType;
|
|
17
|
+
constructor(id: string, options: XernerxInhibitorOptions);
|
|
18
|
+
check<T extends XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>>(
|
|
19
|
+
interaction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>,
|
|
20
|
+
args: T extends XernerxMessage
|
|
21
|
+
? MessageCommandArguments
|
|
22
|
+
: T extends XernerxSlashInteraction
|
|
23
|
+
? SlashCommandArguments
|
|
24
|
+
: T extends XernerxUserContextInteraction
|
|
25
|
+
? XernerxUserContextInteraction
|
|
26
|
+
: XernerxMessageContextInteraction | null
|
|
27
|
+
): Promise<void | any | T>;
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=XernerxInhibitor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XernerxInhibitor.d.ts","sourceRoot":"","sources":["../../src/build/XernerxInhibitor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"XernerxInhibitor.d.ts","sourceRoot":"","sources":["../../src/build/XernerxInhibitor.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACjH,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,gCAAgC,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAEpK;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACpC,SAAwB,EAAE,SAAC;IAC3B,SAAwB,IAAI,SAAC;IAC7B,SAAwB,IAAI,EAAE,aAAa,CAAC;IAC5C,SAAwB,QAAQ,EAAE,WAAW,CAAC;IAC9C,SAAwB,QAAQ,EAAE,MAAM,CAAC;IACzC,SAAwB,MAAM,EAAE,iBAAiB,CAAC;gBAE/B,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;IAelD,KAAK,CAAC,CAAC,SAAS,cAAc,GAAG,kBAAkB,CAAC,uBAAuB,GAAG,6BAA6B,GAAG,gCAAgC,CAAC,EAC3J,WAAW,EAAE,cAAc,GAAG,kBAAkB,CAAC,uBAAuB,GAAG,6BAA6B,GAAG,gCAAgC,CAAC,EAC5I,IAAI,EAAE,CAAC,SAAS,cAAc,GAC3B,uBAAuB,GACvB,CAAC,SAAS,uBAAuB,GACjC,qBAAqB,GACrB,CAAC,SAAS,6BAA6B,GACvC,6BAA6B,GAC7B,gCAAgC,GAAG,IAAI,GACxC,OAAO,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;CAC1B"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
+
/** @format */
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import XernerxClient from '../client/XernerxClient.js';
|
|
3
3
|
/**
|
|
4
4
|
* @description - The inhibitor builder for inhibitors.
|
|
5
5
|
* @param {String} id - The unique ID of the inhibitor.
|
|
6
6
|
* @param {InhibitorOptions} options - The inhibitor options.
|
|
7
7
|
*/
|
|
8
8
|
export default class XernerxInhibitor {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
+
async check(interaction, args) {}
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=XernerxInhibitor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XernerxInhibitor.js","sourceRoot":"","sources":["../../src/build/XernerxInhibitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"XernerxInhibitor.js","sourceRoot":"","sources":["../../src/build/XernerxInhibitor.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;IAQpC,YAAmB,EAAU,EAAE,OAAgC;QAC9D,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QAEb,CAAC,CAAC,MAAM,CAAC;YACR,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;YAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;SAChB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAElB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QAEzB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QAEzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,KAAK,CACjB,WAA4I,EAC5I,IAM0C,IACf,CAAC;CAC7B","sourcesContent":["/** @format */\n\nimport { z } from 'zod';\n\nimport { XernerxInhibitorOptions, MessageCommandArguments, SlashCommandArguments } from '../types/interfaces.js';\nimport { InhibitorType, XernerxInteraction } from '../types/types.js';\nimport { XernerxClientType, XernerxMessage, XernerxMessageContextInteraction, XernerxSlashInteraction, XernerxUserContextInteraction } from '../types/extenders.js';\n\n/**\n * @description - The inhibitor builder for inhibitors.\n * @param {String} id - The unique ID of the inhibitor.\n * @param {InhibitorOptions} options - The inhibitor options.\n */\nexport default class XernerxInhibitor {\n\tpublic declare readonly id;\n\tpublic declare readonly name;\n\tpublic declare readonly type: InhibitorType;\n\tpublic declare readonly fileType: 'Inhibitor';\n\tpublic declare readonly filePath: string;\n\tpublic declare readonly client: XernerxClientType;\n\n\tpublic constructor(id: string, options: XernerxInhibitorOptions) {\n\t\tthis.id = id;\n\n\t\tz.object({\n\t\t\tname: z.string(),\n\t\t\ttype: z.string(),\n\t\t}).parse(options);\n\n\t\tthis.name = options.name;\n\n\t\tthis.type = options.type;\n\n\t\tthis.client = this.client;\n\t}\n\n\tpublic async check<T extends XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>>(\n\t\tinteraction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>,\n\t\targs: T extends XernerxMessage\n\t\t\t? MessageCommandArguments\n\t\t\t: T extends XernerxSlashInteraction\n\t\t\t? SlashCommandArguments\n\t\t\t: T extends XernerxUserContextInteraction\n\t\t\t? XernerxUserContextInteraction\n\t\t\t: XernerxMessageContextInteraction | null\n\t): Promise<void | any | T> {}\n}\n"]}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
import { XernerxMessage } from '../types/extenders.js';
|
|
1
|
+
/** @format */
|
|
2
|
+
import { XernerxClientType, XernerxMessage } from '../types/extenders.js';
|
|
3
3
|
import { MessageCommandArguments, MessageCommandOptions } from '../types/interfaces.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
|
-
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly aliases: string[] | undefined;
|
|
8
|
+
readonly regex: RegExp | undefined;
|
|
9
|
+
readonly prefix: string | string[] | undefined;
|
|
10
|
+
readonly description: string | null | undefined;
|
|
11
|
+
readonly usage: string | null | undefined;
|
|
12
|
+
readonly info: string | null | undefined;
|
|
13
|
+
readonly separator: string | undefined;
|
|
14
|
+
readonly args: import('../types/interfaces.js').MessageCommandArgumentOptions[] | undefined;
|
|
15
|
+
readonly flags: import('../types/interfaces.js').MessageCommandFlagOptions[] | undefined;
|
|
16
|
+
readonly category: string | null | undefined;
|
|
17
|
+
readonly cooldown: number | null | undefined;
|
|
18
|
+
readonly ignore:
|
|
19
|
+
| {
|
|
20
|
+
owner?: boolean | undefined;
|
|
21
|
+
users?: string[] | undefined;
|
|
22
|
+
channels?: string[] | undefined;
|
|
23
|
+
guilds?: string[] | undefined;
|
|
24
|
+
}
|
|
25
|
+
| undefined;
|
|
26
|
+
readonly strict:
|
|
27
|
+
| {
|
|
28
|
+
owner?: boolean | undefined;
|
|
29
|
+
users?: string[] | undefined;
|
|
30
|
+
channels?: string[] | undefined;
|
|
31
|
+
guilds?: string[] | undefined;
|
|
32
|
+
}
|
|
33
|
+
| undefined;
|
|
34
|
+
readonly permissions:
|
|
35
|
+
| {
|
|
36
|
+
user?: string[] | import('../main.js').PermissionNames[] | undefined;
|
|
37
|
+
client?: string[] | import('../main.js').PermissionNames[] | undefined;
|
|
38
|
+
dm?: boolean | undefined;
|
|
39
|
+
}
|
|
40
|
+
| undefined;
|
|
41
|
+
readonly fileType: 'MessageCommand';
|
|
42
|
+
readonly filePath: string;
|
|
43
|
+
readonly client: XernerxClientType;
|
|
44
|
+
constructor(id: string, options: MessageCommandOptions);
|
|
45
|
+
conditions<T>(message: XernerxMessage, { args, flags }: MessageCommandArguments): Promise<void | any | T>;
|
|
46
|
+
exec<T>(message: XernerxMessage, { args, flags }: MessageCommandArguments): Promise<void | any | T>;
|
|
47
47
|
}
|
|
48
48
|
//# sourceMappingURL=XernerxMessageCommand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XernerxMessageCommand.d.ts","sourceRoot":"","sources":["../../src/build/XernerxMessageCommand.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":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