xernerx 4.14.0 → 4.15.0
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/cjs/build/XernerxContextCommand.js +124 -0
- package/dist/cjs/build/XernerxEvent.js +34 -0
- package/dist/cjs/build/XernerxInhibitor.js +30 -0
- package/dist/cjs/build/XernerxMessageCommand.js +122 -0
- package/dist/cjs/build/XernerxSlashCommand.js +180 -0
- package/dist/cjs/client/XernerxClient.js +105 -0
- package/dist/cjs/client/XernerxShardClient.js +56 -0
- package/dist/cjs/functions/deploy.js +66 -0
- package/dist/cjs/functions/load.js +38 -0
- package/dist/cjs/functions/reload.js +33 -0
- package/dist/cjs/functions/setPresence.js +24 -0
- package/dist/cjs/functions/xernerxUser.js +15 -0
- package/dist/cjs/handlers/CommandHandler.js +342 -0
- package/dist/cjs/handlers/EventHandler.js +32 -0
- package/dist/cjs/handlers/ExtensionHandler.js +32 -0
- package/dist/cjs/handlers/Handler.js +48 -0
- package/dist/cjs/handlers/InhibitorHandler.js +34 -0
- package/dist/cjs/handlers/IntegrationHandler.js +29 -0
- package/dist/cjs/main.js +36 -0
- package/dist/cjs/models/Arguments.js +159 -0
- package/dist/cjs/models/Cooldowns.js +36 -0
- package/dist/cjs/tools/XernerxError.js +14 -0
- package/dist/cjs/tools/XernerxIntents.js +27 -0
- package/dist/cjs/tools/XernerxLog.js +98 -0
- package/dist/cjs/tools/XernerxText.js +92 -0
- package/dist/cjs/types/extenders.js +3 -0
- package/dist/cjs/types/interfaces.js +3 -0
- package/dist/cjs/types/types.js +3 -0
- package/dist/{utils → cjs/utils}/ClientUtil.d.ts +2 -1
- package/dist/cjs/utils/ClientUtil.js +84 -0
- package/dist/{utils → cjs/utils}/InteractionUtil.d.ts +3 -2
- package/dist/cjs/utils/InteractionUtil.js +156 -0
- package/dist/{utils → cjs/utils}/MessageUtil.d.ts +3 -0
- package/dist/cjs/utils/MessageUtil.js +170 -0
- package/dist/cjs/utils/Util.js +14 -0
- package/dist/cjs/validators/commandValidation.js +127 -0
- package/dist/{validators → cjs/validators}/inhibitorValidations.d.ts +1 -1
- package/dist/cjs/validators/inhibitorValidations.js +49 -0
- package/dist/mjs/build/XernerxContextCommand.d.ts +53 -0
- package/dist/mjs/build/XernerxEvent.d.ts +25 -0
- package/dist/mjs/build/XernerxInhibitor.d.ts +29 -0
- package/dist/mjs/build/XernerxMessageCommand.d.ts +57 -0
- package/dist/mjs/build/XernerxSlashCommand.d.ts +69 -0
- package/dist/mjs/client/XernerxClient.d.ts +53 -0
- package/dist/mjs/client/XernerxShardClient.d.ts +21 -0
- package/dist/mjs/functions/deploy.d.ts +3 -0
- package/dist/mjs/functions/load.d.ts +4 -0
- package/dist/mjs/functions/reload.d.ts +3 -0
- package/dist/mjs/functions/setPresence.d.ts +4 -0
- package/dist/mjs/functions/xernerxUser.d.ts +4 -0
- package/dist/mjs/handlers/CommandHandler.d.ts +16 -0
- package/dist/{handlers → mjs/handlers}/CommandHandler.js +1 -1
- package/dist/mjs/handlers/EventHandler.d.ts +9 -0
- package/dist/mjs/handlers/ExtensionHandler.d.ts +9 -0
- package/dist/mjs/handlers/Handler.d.ts +14 -0
- package/dist/mjs/handlers/InhibitorHandler.d.ts +9 -0
- package/dist/{handlers/WebhookHandler.d.ts → mjs/handlers/IntegrationHandler.d.ts} +8 -1
- package/dist/mjs/main.d.ts +40 -0
- package/dist/mjs/models/Arguments.d.ts +9 -0
- package/dist/mjs/models/Cooldowns.d.ts +11 -0
- package/dist/mjs/tools/XernerxError.d.ts +7 -0
- package/dist/mjs/tools/XernerxIntents.d.ts +5 -0
- package/dist/mjs/tools/XernerxLog.d.ts +28 -0
- package/dist/mjs/tools/XernerxText.d.ts +30 -0
- package/dist/mjs/types/extenders.d.ts +61 -0
- package/dist/mjs/types/interfaces.d.ts +256 -0
- package/dist/mjs/types/types.d.ts +14 -0
- package/dist/mjs/utils/ClientUtil.d.ts +19 -0
- package/dist/{utils → mjs/utils}/ClientUtil.js +3 -0
- package/dist/mjs/utils/InteractionUtil.d.ts +25 -0
- package/dist/{utils → mjs/utils}/InteractionUtil.js +33 -3
- package/dist/mjs/utils/MessageUtil.d.ts +26 -0
- package/dist/{utils → mjs/utils}/MessageUtil.js +29 -0
- package/dist/mjs/utils/Util.d.ts +9 -0
- package/dist/mjs/validators/commandValidation.d.ts +7 -0
- package/dist/{validators → mjs/validators}/commandValidation.js +10 -22
- package/dist/mjs/validators/inhibitorValidations.d.ts +9 -0
- package/package.json +7 -4
- package/dist/functions/sendWebhook.d.ts +0 -4
- package/dist/functions/sendWebhook.js +0 -14
- package/dist/handlers/WebhookHandler.js +0 -10
- package/dist/{build → cjs/build}/XernerxContextCommand.d.ts +0 -0
- package/dist/{build → cjs/build}/XernerxEvent.d.ts +0 -0
- package/dist/{build → cjs/build}/XernerxInhibitor.d.ts +0 -0
- package/dist/{build → cjs/build}/XernerxMessageCommand.d.ts +0 -0
- package/dist/{build → cjs/build}/XernerxSlashCommand.d.ts +0 -0
- package/dist/{client → cjs/client}/XernerxClient.d.ts +3 -3
- /package/dist/{client → cjs/client}/XernerxShardClient.d.ts +0 -0
- /package/dist/{functions → cjs/functions}/deploy.d.ts +0 -0
- /package/dist/{functions → cjs/functions}/load.d.ts +0 -0
- /package/dist/{functions → cjs/functions}/reload.d.ts +0 -0
- /package/dist/{functions → cjs/functions}/setPresence.d.ts +0 -0
- /package/dist/{functions → cjs/functions}/xernerxUser.d.ts +0 -0
- /package/dist/{handlers → cjs/handlers}/CommandHandler.d.ts +0 -0
- /package/dist/{handlers → cjs/handlers}/EventHandler.d.ts +0 -0
- /package/dist/{handlers → cjs/handlers}/ExtensionHandler.d.ts +0 -0
- /package/dist/{handlers → cjs/handlers}/Handler.d.ts +0 -0
- /package/dist/{handlers → cjs/handlers}/InhibitorHandler.d.ts +0 -0
- /package/dist/{handlers → cjs/handlers}/IntegrationHandler.d.ts +0 -0
- /package/dist/{main.d.ts → cjs/main.d.ts} +0 -0
- /package/dist/{models → cjs/models}/Arguments.d.ts +0 -0
- /package/dist/{models → cjs/models}/Cooldowns.d.ts +0 -0
- /package/dist/{tools → cjs/tools}/XernerxError.d.ts +0 -0
- /package/dist/{tools → cjs/tools}/XernerxIntents.d.ts +0 -0
- /package/dist/{tools → cjs/tools}/XernerxLog.d.ts +0 -0
- /package/dist/{tools → cjs/tools}/XernerxText.d.ts +0 -0
- /package/dist/{types → cjs/types}/extenders.d.ts +0 -0
- /package/dist/{types → cjs/types}/interfaces.d.ts +0 -0
- /package/dist/{types → cjs/types}/types.d.ts +0 -0
- /package/dist/{utils → cjs/utils}/Util.d.ts +0 -0
- /package/dist/{validators → cjs/validators}/commandValidation.d.ts +0 -0
- /package/dist/{build → mjs/build}/XernerxContextCommand.js +0 -0
- /package/dist/{build → mjs/build}/XernerxEvent.js +0 -0
- /package/dist/{build → mjs/build}/XernerxInhibitor.js +0 -0
- /package/dist/{build → mjs/build}/XernerxMessageCommand.js +0 -0
- /package/dist/{build → mjs/build}/XernerxSlashCommand.js +0 -0
- /package/dist/{client → mjs/client}/XernerxClient.js +0 -0
- /package/dist/{client → mjs/client}/XernerxShardClient.js +0 -0
- /package/dist/{functions → mjs/functions}/deploy.js +0 -0
- /package/dist/{functions → mjs/functions}/load.js +0 -0
- /package/dist/{functions → mjs/functions}/reload.js +0 -0
- /package/dist/{functions → mjs/functions}/setPresence.js +0 -0
- /package/dist/{functions → mjs/functions}/xernerxUser.js +0 -0
- /package/dist/{handlers → mjs/handlers}/EventHandler.js +0 -0
- /package/dist/{handlers → mjs/handlers}/ExtensionHandler.js +0 -0
- /package/dist/{handlers → mjs/handlers}/Handler.js +0 -0
- /package/dist/{handlers → mjs/handlers}/InhibitorHandler.js +0 -0
- /package/dist/{handlers → mjs/handlers}/IntegrationHandler.js +0 -0
- /package/dist/{main.js → mjs/main.js} +0 -0
- /package/dist/{models → mjs/models}/Arguments.js +0 -0
- /package/dist/{models → mjs/models}/Cooldowns.js +0 -0
- /package/dist/{tools → mjs/tools}/XernerxError.js +0 -0
- /package/dist/{tools → mjs/tools}/XernerxIntents.js +0 -0
- /package/dist/{tools → mjs/tools}/XernerxLog.js +0 -0
- /package/dist/{tools → mjs/tools}/XernerxText.js +0 -0
- /package/dist/{types → mjs/types}/extenders.js +0 -0
- /package/dist/{types → mjs/types}/interfaces.js +0 -0
- /package/dist/{types → mjs/types}/types.js +0 -0
- /package/dist/{utils → mjs/utils}/Util.js +0 -0
- /package/dist/{validators → mjs/validators}/inhibitorValidations.js +0 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** @format */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const discord_js_1 = require("discord.js");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const XernerxLog_js_1 = __importDefault(require("../tools/XernerxLog.js"));
|
|
7
|
+
class XernerxContextCommand {
|
|
8
|
+
constructor(id, options) {
|
|
9
|
+
this.id = id;
|
|
10
|
+
this.data = new discord_js_1.ContextMenuCommandBuilder();
|
|
11
|
+
this.data.setName(options.name);
|
|
12
|
+
this.data.setNameLocalizations(options.nameLocalizations || null);
|
|
13
|
+
this.data.setType(options.type === 'user' ? 2 : 3);
|
|
14
|
+
this.data.setDMPermission(options.permissions?.dm || null);
|
|
15
|
+
options = zod_1.z
|
|
16
|
+
.object({
|
|
17
|
+
name: zod_1.z.string(),
|
|
18
|
+
type: zod_1.z.enum(['user', 'message']),
|
|
19
|
+
description: zod_1.z.string().or(zod_1.z.null()).default(null),
|
|
20
|
+
usage: zod_1.z.string().or(zod_1.z.null()).default(null),
|
|
21
|
+
info: zod_1.z.string().or(zod_1.z.null()).default(null),
|
|
22
|
+
category: zod_1.z.string().or(zod_1.z.null()).default(null),
|
|
23
|
+
cooldown: zod_1.z.number().or(zod_1.z.null()).default(null),
|
|
24
|
+
global: zod_1.z.boolean().default(true),
|
|
25
|
+
channel: zod_1.z
|
|
26
|
+
.array(zod_1.z.enum([
|
|
27
|
+
'GuildText',
|
|
28
|
+
'DM',
|
|
29
|
+
'GuildVoice',
|
|
30
|
+
'GroupDM',
|
|
31
|
+
'GuildCategory',
|
|
32
|
+
'GuildAnnouncement',
|
|
33
|
+
'AnnouncementThread',
|
|
34
|
+
'PublicThread',
|
|
35
|
+
'PrivateThread',
|
|
36
|
+
'GuildStageVoice',
|
|
37
|
+
'GuildDirectory',
|
|
38
|
+
'GuildForum',
|
|
39
|
+
'GuildNews',
|
|
40
|
+
'GuildNewsThread',
|
|
41
|
+
'GuildPublicThread',
|
|
42
|
+
'GuildPrivateThread',
|
|
43
|
+
]))
|
|
44
|
+
.or(zod_1.z.enum([
|
|
45
|
+
'GuildText',
|
|
46
|
+
'DM',
|
|
47
|
+
'GuildVoice',
|
|
48
|
+
'GroupDM',
|
|
49
|
+
'GuildCategory',
|
|
50
|
+
'GuildAnnouncement',
|
|
51
|
+
'AnnouncementThread',
|
|
52
|
+
'PublicThread',
|
|
53
|
+
'PrivateThread',
|
|
54
|
+
'GuildStageVoice',
|
|
55
|
+
'GuildDirectory',
|
|
56
|
+
'GuildForum',
|
|
57
|
+
'GuildNews',
|
|
58
|
+
'GuildNewsThread',
|
|
59
|
+
'GuildPublicThread',
|
|
60
|
+
'GuildPrivateThread',
|
|
61
|
+
]))
|
|
62
|
+
.or(zod_1.z.null())
|
|
63
|
+
.default(null),
|
|
64
|
+
ignore: zod_1.z
|
|
65
|
+
.object({
|
|
66
|
+
owner: zod_1.z.boolean().default(false),
|
|
67
|
+
users: zod_1.z.array(zod_1.z.string()).default([]),
|
|
68
|
+
channels: zod_1.z.array(zod_1.z.string()).default([]),
|
|
69
|
+
guilds: zod_1.z.array(zod_1.z.string()).default([]),
|
|
70
|
+
voice: zod_1.z.boolean().default(false),
|
|
71
|
+
})
|
|
72
|
+
.default({}),
|
|
73
|
+
strict: zod_1.z
|
|
74
|
+
.object({
|
|
75
|
+
owner: zod_1.z.boolean().default(false),
|
|
76
|
+
users: zod_1.z.array(zod_1.z.string()).default([]),
|
|
77
|
+
channels: zod_1.z.array(zod_1.z.string()).default([]),
|
|
78
|
+
guilds: zod_1.z.array(zod_1.z.string()).default([]),
|
|
79
|
+
voice: zod_1.z.boolean().default(false),
|
|
80
|
+
})
|
|
81
|
+
.default({}),
|
|
82
|
+
permissions: zod_1.z
|
|
83
|
+
.object({
|
|
84
|
+
user: zod_1.z.array(zod_1.z.string()).or(zod_1.z.null()).default(null),
|
|
85
|
+
client: zod_1.z.array(zod_1.z.string()).or(zod_1.z.null()).default(null),
|
|
86
|
+
dm: zod_1.z.boolean().default(true),
|
|
87
|
+
})
|
|
88
|
+
.default({}),
|
|
89
|
+
defer: zod_1.z
|
|
90
|
+
.object({
|
|
91
|
+
reply: zod_1.z.boolean().optional(),
|
|
92
|
+
ephemeral: zod_1.z.boolean().optional(),
|
|
93
|
+
fetch: zod_1.z.boolean().optional(),
|
|
94
|
+
})
|
|
95
|
+
.default({}),
|
|
96
|
+
})
|
|
97
|
+
.parse(options);
|
|
98
|
+
this.name = options.name;
|
|
99
|
+
this.type = options.type;
|
|
100
|
+
this.description = options.description;
|
|
101
|
+
this.usage = options.usage;
|
|
102
|
+
this.info = options.info;
|
|
103
|
+
this.category = options.category;
|
|
104
|
+
this.cooldown = options.cooldown;
|
|
105
|
+
this.channel = options.channel ? (Array.isArray(options.channel) ? options.channel : [options.channel]) : null;
|
|
106
|
+
this.global = options.global;
|
|
107
|
+
this.ignore = options.ignore;
|
|
108
|
+
this.strict = options.strict;
|
|
109
|
+
this.permissions = options.permissions;
|
|
110
|
+
this.defer = options.defer;
|
|
111
|
+
this.client = this.client;
|
|
112
|
+
this.util = this.util;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @description the execution of the command
|
|
116
|
+
* @param interaction - Interaction event emitted on command
|
|
117
|
+
* @param args - The arguments parsed with the command, if any
|
|
118
|
+
*/
|
|
119
|
+
async exec(interaction, args) {
|
|
120
|
+
new XernerxLog_js_1.default(this.client).error(`${this.id} doesn't have an execution rule.`);
|
|
121
|
+
return await this.client.emit('commandError', interaction, `${this.id} doesn't have an execution rule.`, this, this.filetype);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.default = XernerxContextCommand;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** @format */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const XernerxLog_js_1 = __importDefault(require("../tools/XernerxLog.js"));
|
|
6
|
+
/**
|
|
7
|
+
* @description - The event builder for events.
|
|
8
|
+
* @param {String} id - The unique ID of the event.
|
|
9
|
+
* @param {EventOptions} options - The event options.
|
|
10
|
+
*/
|
|
11
|
+
class XernerxEvent {
|
|
12
|
+
constructor(id, options) {
|
|
13
|
+
this.id = id;
|
|
14
|
+
zod_1.z.object({
|
|
15
|
+
name: zod_1.z.string(),
|
|
16
|
+
emitter: zod_1.z.string().optional(),
|
|
17
|
+
type: zod_1.z.string().optional(),
|
|
18
|
+
once: zod_1.z.boolean().optional(),
|
|
19
|
+
}).parse(options);
|
|
20
|
+
this.name = options.name;
|
|
21
|
+
this.emitter = options.emitter || 'client';
|
|
22
|
+
this.type = options.type || 'discord';
|
|
23
|
+
this.once = options.once || false;
|
|
24
|
+
this.client = this.client;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @description run your custom event here.
|
|
28
|
+
* @param any - there can be all kinds of parameters on events.
|
|
29
|
+
*/
|
|
30
|
+
async run(...args) {
|
|
31
|
+
return new XernerxLog_js_1.default(this.client).error(`${this.id} doesn't have a run rule.`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = XernerxEvent;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** @format */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* @description - The inhibitor builder for inhibitors.
|
|
7
|
+
* @param {String} id - The unique ID of the inhibitor.
|
|
8
|
+
* @param {InhibitorOptions} options - The inhibitor options.
|
|
9
|
+
*/
|
|
10
|
+
class XernerxInhibitor {
|
|
11
|
+
constructor(id, options) {
|
|
12
|
+
this.id = id;
|
|
13
|
+
zod_1.z.object({
|
|
14
|
+
name: zod_1.z.string(),
|
|
15
|
+
type: zod_1.z.string(),
|
|
16
|
+
}).parse(options);
|
|
17
|
+
this.name = options.name;
|
|
18
|
+
this.type = options.type;
|
|
19
|
+
this.client = this.client;
|
|
20
|
+
}
|
|
21
|
+
pre(interaction, args) { }
|
|
22
|
+
/**
|
|
23
|
+
* @description The check rule
|
|
24
|
+
* @param interaction - The interaction with the inhibitor, can be message and interaction
|
|
25
|
+
* @param args - The arguments parsed with this command
|
|
26
|
+
*/
|
|
27
|
+
async check(interaction, args, command) { }
|
|
28
|
+
async post(interaction, args, command) { }
|
|
29
|
+
}
|
|
30
|
+
exports.default = XernerxInhibitor;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** @format */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const XernerxLog_js_1 = __importDefault(require("../tools/XernerxLog.js"));
|
|
6
|
+
class XernerxMessageCommand {
|
|
7
|
+
constructor(id, options) {
|
|
8
|
+
this.id = id;
|
|
9
|
+
this.regex = options.regex;
|
|
10
|
+
this.args = options.args;
|
|
11
|
+
this.flags = options.flags;
|
|
12
|
+
options = zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
name: zod_1.z.string(),
|
|
15
|
+
aliases: zod_1.z.array(zod_1.z.string()).default([]),
|
|
16
|
+
description: zod_1.z.string().or(zod_1.z.null()).default(null),
|
|
17
|
+
usage: zod_1.z.string().or(zod_1.z.null()).default(null),
|
|
18
|
+
info: zod_1.z.string().or(zod_1.z.null()).default(null),
|
|
19
|
+
category: zod_1.z.string().or(zod_1.z.null()).default(null),
|
|
20
|
+
cooldown: zod_1.z.number().or(zod_1.z.null()).default(null),
|
|
21
|
+
global: zod_1.z.boolean().default(true),
|
|
22
|
+
channel: zod_1.z
|
|
23
|
+
.array(zod_1.z.enum([
|
|
24
|
+
'GuildText',
|
|
25
|
+
'DM',
|
|
26
|
+
'GuildVoice',
|
|
27
|
+
'GroupDM',
|
|
28
|
+
'GuildCategory',
|
|
29
|
+
'GuildAnnouncement',
|
|
30
|
+
'AnnouncementThread',
|
|
31
|
+
'PublicThread',
|
|
32
|
+
'PrivateThread',
|
|
33
|
+
'GuildStageVoice',
|
|
34
|
+
'GuildDirectory',
|
|
35
|
+
'GuildForum',
|
|
36
|
+
'GuildNews',
|
|
37
|
+
'GuildNewsThread',
|
|
38
|
+
'GuildPublicThread',
|
|
39
|
+
'GuildPrivateThread',
|
|
40
|
+
]))
|
|
41
|
+
.or(zod_1.z.enum([
|
|
42
|
+
'GuildText',
|
|
43
|
+
'DM',
|
|
44
|
+
'GuildVoice',
|
|
45
|
+
'GroupDM',
|
|
46
|
+
'GuildCategory',
|
|
47
|
+
'GuildAnnouncement',
|
|
48
|
+
'AnnouncementThread',
|
|
49
|
+
'PublicThread',
|
|
50
|
+
'PrivateThread',
|
|
51
|
+
'GuildStageVoice',
|
|
52
|
+
'GuildDirectory',
|
|
53
|
+
'GuildForum',
|
|
54
|
+
'GuildNews',
|
|
55
|
+
'GuildNewsThread',
|
|
56
|
+
'GuildPublicThread',
|
|
57
|
+
'GuildPrivateThread',
|
|
58
|
+
]))
|
|
59
|
+
.or(zod_1.z.null())
|
|
60
|
+
.default(null),
|
|
61
|
+
prefix: zod_1.z.array(zod_1.z.string()).or(zod_1.z.string()).default([]),
|
|
62
|
+
ignore: zod_1.z
|
|
63
|
+
.object({
|
|
64
|
+
owner: zod_1.z.boolean().default(false),
|
|
65
|
+
users: zod_1.z.array(zod_1.z.string()).default([]),
|
|
66
|
+
channels: zod_1.z.array(zod_1.z.string()).default([]),
|
|
67
|
+
guilds: zod_1.z.array(zod_1.z.string()).default([]),
|
|
68
|
+
voice: zod_1.z.boolean().default(false),
|
|
69
|
+
})
|
|
70
|
+
.default({}),
|
|
71
|
+
strict: zod_1.z
|
|
72
|
+
.object({
|
|
73
|
+
owner: zod_1.z.boolean().default(false),
|
|
74
|
+
users: zod_1.z.array(zod_1.z.string()).default([]),
|
|
75
|
+
channels: zod_1.z.array(zod_1.z.string()).default([]),
|
|
76
|
+
guilds: zod_1.z.array(zod_1.z.string()).default([]),
|
|
77
|
+
voice: zod_1.z.boolean().default(false),
|
|
78
|
+
})
|
|
79
|
+
.default({}),
|
|
80
|
+
permissions: zod_1.z
|
|
81
|
+
.object({
|
|
82
|
+
user: zod_1.z.array(zod_1.z.string()).or(zod_1.z.null()).default(null),
|
|
83
|
+
client: zod_1.z.array(zod_1.z.string()).or(zod_1.z.null()).default(null),
|
|
84
|
+
dm: zod_1.z.boolean().default(true),
|
|
85
|
+
})
|
|
86
|
+
.default({}),
|
|
87
|
+
})
|
|
88
|
+
.parse(options);
|
|
89
|
+
this.name = options.name;
|
|
90
|
+
this.aliases = options.aliases;
|
|
91
|
+
this.prefix = options.prefix;
|
|
92
|
+
this.description = options.description;
|
|
93
|
+
this.usage = options.usage;
|
|
94
|
+
this.info = options.info;
|
|
95
|
+
this.category = options.category;
|
|
96
|
+
this.cooldown = options.cooldown;
|
|
97
|
+
this.channel = options.channel ? (Array.isArray(options.channel) ? options.channel : [options.channel]) : null;
|
|
98
|
+
this.global = options.global;
|
|
99
|
+
this.ignore = options.ignore;
|
|
100
|
+
this.strict = options.strict;
|
|
101
|
+
this.separator = options.separator;
|
|
102
|
+
this.permissions = options.permissions;
|
|
103
|
+
this.client = this.client;
|
|
104
|
+
this.util = this.util;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @description Checks for conditions before running the command
|
|
108
|
+
* @param message - The message event emitted on this command
|
|
109
|
+
* @param options - The args and flags parsed on this command
|
|
110
|
+
*/
|
|
111
|
+
async conditions(message, { args, flags }) { }
|
|
112
|
+
/**
|
|
113
|
+
* @description Runs the execution rule
|
|
114
|
+
* @param message - The message event emitted on this command
|
|
115
|
+
* @param options - The args and flags parsed on this command
|
|
116
|
+
*/
|
|
117
|
+
async exec(message, { args, flags }) {
|
|
118
|
+
new XernerxLog_js_1.default(this.client).error(`${this.id} doesn't have an execution rule.`);
|
|
119
|
+
return await this.client.emit('commandError', message, `${this.id} doesn't have an execution rule.`, this, this.filetype);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.default = XernerxMessageCommand;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** @format */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const discord_js_1 = __importStar(require("discord.js"));
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const XernerxLog_js_1 = __importDefault(require("../tools/XernerxLog.js"));
|
|
7
|
+
class XernerxSlashCommand {
|
|
8
|
+
constructor(id, options) {
|
|
9
|
+
this.id = id;
|
|
10
|
+
this.data = new discord_js_1.default.SlashCommandBuilder();
|
|
11
|
+
this.data.setName(options.name);
|
|
12
|
+
this.data.setNameLocalizations(options.nameLocalizations || null);
|
|
13
|
+
this.data.setDescription(options.description);
|
|
14
|
+
this.data.setDescriptionLocalizations(options.descriptionLocalizations || null);
|
|
15
|
+
this.data.setDMPermission(options.permissions?.dm || null);
|
|
16
|
+
if (options.args && options?.args?.length > 0) {
|
|
17
|
+
this.addArguments(this.data, options.args);
|
|
18
|
+
}
|
|
19
|
+
if (options.subcommands && options?.subcommands?.length > 0) {
|
|
20
|
+
this.addSubcommands(this.data, options.subcommands);
|
|
21
|
+
}
|
|
22
|
+
if (options.groups && options?.groups?.length > 0) {
|
|
23
|
+
this.addSubcommandGroups(options.groups);
|
|
24
|
+
}
|
|
25
|
+
options = zod_1.z
|
|
26
|
+
.object({
|
|
27
|
+
name: zod_1.z.string(),
|
|
28
|
+
description: zod_1.z.string(),
|
|
29
|
+
usage: zod_1.z.string().or(zod_1.z.null()).default(null),
|
|
30
|
+
info: zod_1.z.string().or(zod_1.z.null()).default(null),
|
|
31
|
+
category: zod_1.z.string().or(zod_1.z.null()).default(null),
|
|
32
|
+
number: zod_1.z.number().or(zod_1.z.null()).default(null),
|
|
33
|
+
global: zod_1.z.boolean().default(true),
|
|
34
|
+
channel: zod_1.z
|
|
35
|
+
.array(zod_1.z.enum([
|
|
36
|
+
'GuildText',
|
|
37
|
+
'DM',
|
|
38
|
+
'GuildVoice',
|
|
39
|
+
'GroupDM',
|
|
40
|
+
'GuildCategory',
|
|
41
|
+
'GuildAnnouncement',
|
|
42
|
+
'AnnouncementThread',
|
|
43
|
+
'PublicThread',
|
|
44
|
+
'PrivateThread',
|
|
45
|
+
'GuildStageVoice',
|
|
46
|
+
'GuildDirectory',
|
|
47
|
+
'GuildForum',
|
|
48
|
+
'GuildNews',
|
|
49
|
+
'GuildNewsThread',
|
|
50
|
+
'GuildPublicThread',
|
|
51
|
+
'GuildPrivateThread',
|
|
52
|
+
]))
|
|
53
|
+
.or(zod_1.z.enum([
|
|
54
|
+
'GuildText',
|
|
55
|
+
'DM',
|
|
56
|
+
'GuildVoice',
|
|
57
|
+
'GroupDM',
|
|
58
|
+
'GuildCategory',
|
|
59
|
+
'GuildAnnouncement',
|
|
60
|
+
'AnnouncementThread',
|
|
61
|
+
'PublicThread',
|
|
62
|
+
'PrivateThread',
|
|
63
|
+
'GuildStageVoice',
|
|
64
|
+
'GuildDirectory',
|
|
65
|
+
'GuildForum',
|
|
66
|
+
'GuildNews',
|
|
67
|
+
'GuildNewsThread',
|
|
68
|
+
'GuildPublicThread',
|
|
69
|
+
'GuildPrivateThread',
|
|
70
|
+
]))
|
|
71
|
+
.or(zod_1.z.null())
|
|
72
|
+
.default(null),
|
|
73
|
+
ignore: zod_1.z
|
|
74
|
+
.object({
|
|
75
|
+
owner: zod_1.z.boolean().default(false),
|
|
76
|
+
users: zod_1.z.array(zod_1.z.string()).default([]),
|
|
77
|
+
channels: zod_1.z.array(zod_1.z.string()).default([]),
|
|
78
|
+
guilds: zod_1.z.array(zod_1.z.string()).default([]),
|
|
79
|
+
voice: zod_1.z.boolean().default(false),
|
|
80
|
+
})
|
|
81
|
+
.default({}),
|
|
82
|
+
strict: zod_1.z
|
|
83
|
+
.object({
|
|
84
|
+
owner: zod_1.z.boolean().default(false),
|
|
85
|
+
users: zod_1.z.array(zod_1.z.string()).default([]),
|
|
86
|
+
channels: zod_1.z.array(zod_1.z.string()).default([]),
|
|
87
|
+
guilds: zod_1.z.array(zod_1.z.string()).default([]),
|
|
88
|
+
voice: zod_1.z.boolean().default(false),
|
|
89
|
+
})
|
|
90
|
+
.default({}),
|
|
91
|
+
permissions: zod_1.z
|
|
92
|
+
.object({
|
|
93
|
+
user: zod_1.z.array(zod_1.z.string()).or(zod_1.z.null()).default(null),
|
|
94
|
+
client: zod_1.z.array(zod_1.z.string()).or(zod_1.z.null()).default(null),
|
|
95
|
+
dm: zod_1.z.boolean().default(true),
|
|
96
|
+
})
|
|
97
|
+
.default({}),
|
|
98
|
+
defer: zod_1.z
|
|
99
|
+
.object({
|
|
100
|
+
reply: zod_1.z.boolean().optional(),
|
|
101
|
+
ephemeral: zod_1.z.boolean().optional(),
|
|
102
|
+
fetch: zod_1.z.boolean().optional(),
|
|
103
|
+
})
|
|
104
|
+
.default({}),
|
|
105
|
+
})
|
|
106
|
+
.parse(options);
|
|
107
|
+
this.name = options.name;
|
|
108
|
+
this.description = options.description;
|
|
109
|
+
this.usage = options.usage;
|
|
110
|
+
this.info = options.info;
|
|
111
|
+
this.category = options.category;
|
|
112
|
+
this.cooldown = options.cooldown;
|
|
113
|
+
this.channel = options.channel ? (Array.isArray(options.channel) ? options.channel : [options.channel]) : null;
|
|
114
|
+
this.global = options.global;
|
|
115
|
+
this.ignore = options.ignore;
|
|
116
|
+
this.strict = options.strict;
|
|
117
|
+
this.permissions = options.permissions;
|
|
118
|
+
this.defer = options.defer;
|
|
119
|
+
this.client = this.client;
|
|
120
|
+
this.util = this.util;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @description autocomplete let's you add choices to string option arguments
|
|
124
|
+
* @param interaction - The interaction event emitted on this command
|
|
125
|
+
* @param focused - The command option that is in focus
|
|
126
|
+
* @param options - The full list of options on the command
|
|
127
|
+
*/
|
|
128
|
+
async autocomplete(interaction, focused, options) { }
|
|
129
|
+
/**
|
|
130
|
+
* @description Checks for conditions before running the command
|
|
131
|
+
* @param interaction - The interaction event emitted on this command
|
|
132
|
+
* @param options - The args, group and subcommand parsed on this command
|
|
133
|
+
*/
|
|
134
|
+
async conditions(interaction, { args, subcommand, group }) { }
|
|
135
|
+
/**
|
|
136
|
+
* @description Runs the execution rule
|
|
137
|
+
* @param interaction - The interaction event emitted on this command
|
|
138
|
+
* @param options - The args, group and subcommand parsed on this command
|
|
139
|
+
*/
|
|
140
|
+
async exec(interaction, { args, subcommand, group }) {
|
|
141
|
+
new XernerxLog_js_1.default(this.client).error(`${this.id} doesn't have an execution rule.`);
|
|
142
|
+
return await this.client.emit('commandError', interaction, `${this.id} doesn't have an execution rule.`, this, this.filetype);
|
|
143
|
+
}
|
|
144
|
+
addArguments(command, args) {
|
|
145
|
+
for (const argument of args) {
|
|
146
|
+
let slashCommandArgumentType = `${argument.type.charAt(0).toUpperCase()}${argument.type.slice(1).toLowerCase()}`;
|
|
147
|
+
command[`add${slashCommandArgumentType}Option`]((option) => {
|
|
148
|
+
option
|
|
149
|
+
.setName(argument.name)
|
|
150
|
+
.setDescription(argument.description)
|
|
151
|
+
.setRequired(argument.required || false);
|
|
152
|
+
if (slashCommandArgumentType === 'String') {
|
|
153
|
+
if (argument.choices)
|
|
154
|
+
option.setChoices(...argument.choices.map((choices) => {
|
|
155
|
+
return { name: Object.keys(choices).at(0), value: Object.values(choices).at(0) };
|
|
156
|
+
}));
|
|
157
|
+
option.setAutocomplete(argument.autocomplete || false);
|
|
158
|
+
}
|
|
159
|
+
return option;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
addSubcommands(method, subcommands) {
|
|
164
|
+
for (const subcommand of subcommands) {
|
|
165
|
+
let sub = new discord_js_1.SlashCommandSubcommandBuilder().setName(subcommand.name).setDescription(subcommand.description);
|
|
166
|
+
if (subcommand.args && subcommand?.args?.length > 0)
|
|
167
|
+
this.addArguments(sub, subcommand.args);
|
|
168
|
+
method.addSubcommand(sub);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
addSubcommandGroups(groups) {
|
|
172
|
+
for (const group of groups) {
|
|
173
|
+
let subcommandGroup = new discord_js_1.SlashCommandSubcommandGroupBuilder().setName(group.name).setDescription(group.description);
|
|
174
|
+
if (group.subcommands?.length > 0)
|
|
175
|
+
this.addSubcommands(subcommandGroup, group.subcommands);
|
|
176
|
+
this.data.addSubcommandGroup(subcommandGroup);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
exports.default = XernerxSlashCommand;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** @format */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const discord_js_1 = require("discord.js");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const CommandHandler_js_1 = __importDefault(require("../handlers/CommandHandler.js"));
|
|
7
|
+
const EventHandler_js_1 = __importDefault(require("../handlers/EventHandler.js"));
|
|
8
|
+
const InhibitorHandler_js_1 = __importDefault(require("../handlers/InhibitorHandler.js"));
|
|
9
|
+
const IntegrationHandler_js_1 = __importDefault(require("../handlers/IntegrationHandler.js"));
|
|
10
|
+
const XernerxLog_js_1 = __importDefault(require("../tools/XernerxLog.js"));
|
|
11
|
+
const ClientUtil_js_1 = __importDefault(require("../utils/ClientUtil.js"));
|
|
12
|
+
const ExtensionHandler_js_1 = __importDefault(require("../handlers/ExtensionHandler.js"));
|
|
13
|
+
const deploy_js_1 = __importDefault(require("../functions/deploy.js"));
|
|
14
|
+
const Cooldowns_js_1 = __importDefault(require("../models/Cooldowns.js"));
|
|
15
|
+
class XernerxClient extends discord_js_1.Client {
|
|
16
|
+
constructor(discordOptions, xernerxOptions, config) {
|
|
17
|
+
super(discordOptions);
|
|
18
|
+
this.settings = zod_1.z
|
|
19
|
+
.object({
|
|
20
|
+
local: zod_1.z.string(),
|
|
21
|
+
global: zod_1.z.boolean().default(false).optional(),
|
|
22
|
+
ownerId: zod_1.z.string().or(zod_1.z.array(zod_1.z.string())).default([]),
|
|
23
|
+
ceaseless: zod_1.z.boolean().default(false),
|
|
24
|
+
permissions: zod_1.z
|
|
25
|
+
.object({
|
|
26
|
+
client: zod_1.z.array(zod_1.z.string()).or(zod_1.z.null()).default(null),
|
|
27
|
+
user: zod_1.z.array(zod_1.z.string()).or(zod_1.z.null()).default(null),
|
|
28
|
+
dm: zod_1.z.boolean().default(false),
|
|
29
|
+
})
|
|
30
|
+
.optional(),
|
|
31
|
+
ignore: zod_1.z
|
|
32
|
+
.object({
|
|
33
|
+
owner: zod_1.z.boolean().default(false),
|
|
34
|
+
self: zod_1.z.boolean().default(true),
|
|
35
|
+
bots: zod_1.z.boolean().default(true),
|
|
36
|
+
system: zod_1.z.boolean().default(true),
|
|
37
|
+
users: zod_1.z.array(zod_1.z.string()).default([]),
|
|
38
|
+
channels: zod_1.z.array(zod_1.z.string()).default([]),
|
|
39
|
+
guilds: zod_1.z.array(zod_1.z.string()).default([]),
|
|
40
|
+
})
|
|
41
|
+
.optional(),
|
|
42
|
+
log: zod_1.z
|
|
43
|
+
.object({
|
|
44
|
+
ready: zod_1.z.boolean().default(false),
|
|
45
|
+
info: zod_1.z.boolean().default(false),
|
|
46
|
+
warn: zod_1.z.boolean().default(false),
|
|
47
|
+
error: zod_1.z.boolean().default(false),
|
|
48
|
+
table: zod_1.z.array(zod_1.z.string()).or(zod_1.z.null()).default(null),
|
|
49
|
+
})
|
|
50
|
+
.or(zod_1.z.boolean())
|
|
51
|
+
.optional(),
|
|
52
|
+
cooldown: zod_1.z
|
|
53
|
+
.object({
|
|
54
|
+
command: zod_1.z.number().default(0),
|
|
55
|
+
cache: zod_1.z.number().default(0),
|
|
56
|
+
collections: zod_1.z.array(zod_1.z.string()).default(['commands']),
|
|
57
|
+
})
|
|
58
|
+
.optional(),
|
|
59
|
+
})
|
|
60
|
+
.parse(xernerxOptions);
|
|
61
|
+
this.config = config || null;
|
|
62
|
+
this.commands = {
|
|
63
|
+
message: new discord_js_1.Collection(),
|
|
64
|
+
slash: new discord_js_1.Collection(),
|
|
65
|
+
context: new discord_js_1.Collection(),
|
|
66
|
+
};
|
|
67
|
+
this.events = new discord_js_1.Collection();
|
|
68
|
+
this.inhibitors = new discord_js_1.Collection();
|
|
69
|
+
this.util = new ClientUtil_js_1.default(this);
|
|
70
|
+
this.stats = {
|
|
71
|
+
guildCount: this.guilds.cache.size,
|
|
72
|
+
userCount: 0,
|
|
73
|
+
shardId: 0,
|
|
74
|
+
shardCount: this.options.shardCount || 1,
|
|
75
|
+
voteCount: 0,
|
|
76
|
+
};
|
|
77
|
+
this.dbl = {};
|
|
78
|
+
this.cache = {
|
|
79
|
+
messages: new discord_js_1.Collection(),
|
|
80
|
+
cooldowns: new discord_js_1.Collection(),
|
|
81
|
+
};
|
|
82
|
+
this.cooldowns = new Cooldowns_js_1.default(this, xernerxOptions.cooldown?.collections);
|
|
83
|
+
this.modules = {
|
|
84
|
+
options: {},
|
|
85
|
+
commandHandler: new CommandHandler_js_1.default(this),
|
|
86
|
+
eventHandler: new EventHandler_js_1.default(this),
|
|
87
|
+
inhibitorHandler: new InhibitorHandler_js_1.default(this),
|
|
88
|
+
integrationHandler: new IntegrationHandler_js_1.default(this),
|
|
89
|
+
extensionHandler: new ExtensionHandler_js_1.default(this),
|
|
90
|
+
};
|
|
91
|
+
return this;
|
|
92
|
+
}
|
|
93
|
+
async connect(token) {
|
|
94
|
+
const login = this.login(token);
|
|
95
|
+
(0, deploy_js_1.default)(this);
|
|
96
|
+
if (this.settings.ceaseless) {
|
|
97
|
+
process.on('unhandledRejection', (error) => {
|
|
98
|
+
new XernerxLog_js_1.default(this).error('An uncaught error happpened, this is triggered from the ceaseless setting.', error);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
new XernerxLog_js_1.default(this).ready();
|
|
102
|
+
return login;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.default = XernerxClient;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** @format */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const discord_js_1 = require("discord.js");
|
|
5
|
+
const dumfunctions_1 = require("dumfunctions");
|
|
6
|
+
const XernerxLog_js_1 = __importDefault(require("../tools/XernerxLog.js"));
|
|
7
|
+
class XernerxShardClient extends discord_js_1.ShardingManager {
|
|
8
|
+
constructor(file, discordOptions, xernerxOptions, data = {}) {
|
|
9
|
+
super(file, discordOptions);
|
|
10
|
+
this.stats = { guildCount: 0, userCount: 0, shardCount: 0, voteCount: 0, shards: {} };
|
|
11
|
+
this.user = null;
|
|
12
|
+
this.on('shardCreate', async (shard) => {
|
|
13
|
+
shard
|
|
14
|
+
.on('ready', async () => {
|
|
15
|
+
await new Promise((resolve) => setTimeout(resolve, 250));
|
|
16
|
+
const stats = (await shard.fetchClientValue('stats'));
|
|
17
|
+
this.stats.shards[String(shard.id)] = stats;
|
|
18
|
+
this.user = (await shard.fetchClientValue('user'));
|
|
19
|
+
this.stats.guildCount += stats.guildCount;
|
|
20
|
+
this.stats.userCount += stats.userCount;
|
|
21
|
+
this.stats.shardCount++;
|
|
22
|
+
this.stats.voteCount = stats.voteCount;
|
|
23
|
+
shard.send({ type: 'xernerx', data: { shardId: shard.id, sharded: true } });
|
|
24
|
+
shard.send({ type: 'client', data });
|
|
25
|
+
await new XernerxLog_js_1.default({ settings: xernerxOptions }).info(`Launched shard ${dumfunctions_1.Style.log(String(shard.id), { color: dumfunctions_1.Style.TextColor.Cyan })} for ${dumfunctions_1.Style.log(this.user?.tag, { color: dumfunctions_1.Style.TextColor.Blue })}! ${xernerxOptions?.timeout ? `Automatically killing in ${dumfunctions_1.Style.log(String(xernerxOptions.timeout), { color: dumfunctions_1.Style.TextColor.Cyan })}ms.` : ''}`);
|
|
26
|
+
})
|
|
27
|
+
.on('error', (error) => {
|
|
28
|
+
new XernerxLog_js_1.default({ settings: xernerxOptions }).info(`An error occurred in ${dumfunctions_1.Style.log(String(shard.id), { color: dumfunctions_1.Style.TextColor.Cyan })} for ${dumfunctions_1.Style.log(String(this.user?.tag), { color: dumfunctions_1.Style.TextColor.Blue })}! ${error}`);
|
|
29
|
+
});
|
|
30
|
+
if (xernerxOptions?.timeout)
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
new XernerxLog_js_1.default({ settings: xernerxOptions }).warn(`Automatically killing shard ${dumfunctions_1.Style.log(String(shard.id), { color: dumfunctions_1.Style.TextColor.Cyan })} on ${dumfunctions_1.Style.log(String(shard.manager.user?.tag), {
|
|
33
|
+
color: dumfunctions_1.Style.TextColor.Blue,
|
|
34
|
+
})}!`);
|
|
35
|
+
shard.kill();
|
|
36
|
+
}, xernerxOptions.timeout);
|
|
37
|
+
});
|
|
38
|
+
const spawn = this.spawn();
|
|
39
|
+
this.spawner = spawn;
|
|
40
|
+
spawn.then(async (shards) => {
|
|
41
|
+
const collector = setInterval(() => {
|
|
42
|
+
const index = shards.size - 1;
|
|
43
|
+
if (shards.get(index)?.ready) {
|
|
44
|
+
clearInterval(collector);
|
|
45
|
+
new XernerxLog_js_1.default({ settings: xernerxOptions }).info(`All Shards launched for ${dumfunctions_1.Style.log(String(this.user?.tag), {
|
|
46
|
+
color: dumfunctions_1.Style.TextColor.Blue,
|
|
47
|
+
})} with a total of ${dumfunctions_1.Style.log(String(this.stats.shardCount), { color: dumfunctions_1.Style.TextColor.Cyan })} shard${this.stats.shardCount > 1 ? 's' : ''}, watching ${dumfunctions_1.Style.log(String(this.stats.guildCount), {
|
|
48
|
+
color: dumfunctions_1.Style.TextColor.Cyan,
|
|
49
|
+
})} guild${this.stats.guildCount > 1 ? 's' : ''}, and ${dumfunctions_1.Style.log(String(this.stats.userCount), { color: dumfunctions_1.Style.TextColor.Cyan })} user${this.stats.userCount > 1 ? 's' : ''}!`);
|
|
50
|
+
}
|
|
51
|
+
}, 1000);
|
|
52
|
+
});
|
|
53
|
+
return this;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.default = XernerxShardClient;
|