xernerx 4.8.2 → 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(() => shard.kill(), xernerxOptions.timeout);
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;
@@ -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).name, { color: Style.TextColor.Blue })}`}.`);
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xernerx",
3
- "version": "4.8.2",
3
+ "version": "4.8.3",
4
4
  "description": "A bot framework for discord.js.",
5
5
  "main": "dist/main.js",
6
6
  "type": "module",