UNPKG

status-sharding

Version:

Welcome to Status Sharding! This package is designed to provide an efficient and flexible solution for sharding Discord bots, allowing you to scale your bot across multiple processes or workers.

22 lines 808 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ShardingClient = void 0; const discord_js_1 = require("discord.js"); const clusterClient_1 = require("./clusterClient"); const utils_1 = require("../other/utils"); /** Modified DiscordClient with bunch of new methods. */ class ShardingClient extends discord_js_1.Client { /** Cluster associated with this client. */ cluster; /** Creates an instance of ShardingClient. */ constructor(options) { super({ ...options, shards: (0, utils_1.getInfo)().ShardList, shardCount: (0, utils_1.getInfo)().TotalShards, }); this.cluster = new clusterClient_1.ClusterClient(this); } } exports.ShardingClient = ShardingClient; //# sourceMappingURL=client.js.map