xernerx 4.8.1 → 4.8.3
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.
|
@@ -17,13 +17,18 @@ export default class XernerxShardClient extends ShardingManager {
|
|
|
17
17
|
this.stats.guildCount += Number(guildCount);
|
|
18
18
|
this.stats.userCount += Number(userCount);
|
|
19
19
|
this.stats.shardCount++;
|
|
20
|
-
await new XernerxLog({ settings: xernerxOptions }).info(`Launched shard ${Style.log(String(shard.id), { color: Style.TextColor.Cyan })} for ${Style.log(this.user?.tag, { color: Style.TextColor.Blue })}
|
|
20
|
+
await new XernerxLog({ settings: xernerxOptions }).info(`Launched shard ${Style.log(String(shard.id), { color: Style.TextColor.Cyan })} for ${Style.log(this.user?.tag, { color: Style.TextColor.Blue })}! ${xernerxOptions?.timeout ? `Automatically killing in ${Style.log(String(xernerxOptions.timeout), { color: Style.TextColor.Cyan })}ms.` : ''}`);
|
|
21
21
|
})
|
|
22
22
|
.on('error', (error) => {
|
|
23
23
|
new XernerxLog({ settings: xernerxOptions }).info(`An error occurred in ${Style.log(String(shard.id), { color: Style.TextColor.Cyan })} for ${Style.log(String(this.user?.tag), { color: Style.TextColor.Blue })}! ${error}`);
|
|
24
24
|
});
|
|
25
25
|
if (xernerxOptions?.timeout)
|
|
26
|
-
setTimeout(() =>
|
|
26
|
+
setTimeout(() => {
|
|
27
|
+
new XernerxLog({ settings: xernerxOptions }).warn(`Automatically killing shard ${Style.log(String(shard.id), { color: Style.TextColor.Cyan })} on ${Style.log(String(shard.manager.user?.tag), {
|
|
28
|
+
color: Style.TextColor.Blue,
|
|
29
|
+
})}!`);
|
|
30
|
+
shard.kill();
|
|
31
|
+
}, xernerxOptions.timeout);
|
|
27
32
|
});
|
|
28
33
|
const spawn = this.spawn();
|
|
29
34
|
this.spawner = spawn;
|
package/dist/functions/deploy.js
CHANGED
|
@@ -35,7 +35,7 @@ export default function deploy(client) {
|
|
|
35
35
|
color: Style.TextColor.Cyan,
|
|
36
36
|
})} Commands ${client.settings.global
|
|
37
37
|
? Style.log('globally', { color: Style.TextColor.Green })
|
|
38
|
-
: `${Style.log('locally', { color: Style.TextColor.Red })} in ${Style.log(client.guilds.cache.get(client.settings.local)
|
|
38
|
+
: `${Style.log('locally', { color: Style.TextColor.Red })} in ${Style.log(client.guilds.cache.get(client.settings.local)?.name, { color: Style.TextColor.Blue })}`}.`);
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
}
|
package/dist/tools/XernerxLog.js
CHANGED
|
@@ -18,10 +18,16 @@ export default class XernerxLog {
|
|
|
18
18
|
this.time = () => String(new Date()).split(/ +/)[4];
|
|
19
19
|
}
|
|
20
20
|
info(message, force = false) {
|
|
21
|
-
return this.infoLog || force
|
|
21
|
+
return this.infoLog || force
|
|
22
|
+
? console.info(`✔️ | ${Style.log('Xernerx', { color: Style.TextColor.Purple })} | ${Style.log(this.time(), {
|
|
23
|
+
color: Style.TextColor.Cyan,
|
|
24
|
+
})} | ${Math.round(process.memoryUsage().rss / 1000000)}mb | ${message}`)
|
|
25
|
+
: null;
|
|
22
26
|
}
|
|
23
27
|
warn(message) {
|
|
24
|
-
return this.warnLog
|
|
28
|
+
return this.warnLog
|
|
29
|
+
? console.warn(`⚠️ | ${Style.log('Xernerx', { color: Style.TextColor.Yellow })} | ${Style.log(this.time(), { color: Style.TextColor.Cyan })} | ${Math.round(process.memoryUsage().rss / 1000000)}mb | ${message}`)
|
|
30
|
+
: null;
|
|
25
31
|
}
|
|
26
32
|
async update(version, url) {
|
|
27
33
|
const pkg = await fetch(url)
|
|
@@ -34,7 +40,7 @@ export default class XernerxLog {
|
|
|
34
40
|
}
|
|
35
41
|
error(message, error) {
|
|
36
42
|
return this.errorLog
|
|
37
|
-
? console.error(`❗ | ${Style.log('Xernerx', { color: Style.TextColor.Red })} | ${Style.log(this.time(), { color: Style.TextColor.Cyan })} | ${message}${error ? ` | ${error.stack}` : ''}`)
|
|
43
|
+
? console.error(`❗ | ${Style.log('Xernerx', { color: Style.TextColor.Red })} | ${Style.log(this.time(), { color: Style.TextColor.Cyan })} | ${Math.round(process.memoryUsage().rss / 1000000)}mb | ${message}${error ? ` | ${error.stack}` : ''}`)
|
|
38
44
|
: null;
|
|
39
45
|
}
|
|
40
46
|
ready() {
|
package/package.json
CHANGED
package/image.png
DELETED
|
Binary file
|