mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
Add internal sharding options
This commit is contained in:
@@ -552,6 +552,12 @@ class Client extends EventEmitter {
|
||||
if (typeof options.restWsBridgeTimeout !== 'number' || isNaN(options.restWsBridgeTimeout)) {
|
||||
throw new TypeError('The restWsBridgeTimeout option must be a number.');
|
||||
}
|
||||
if (typeof options.internalSharding !== 'boolean') {
|
||||
throw new TypeError('The internalSharding option must be a boolean.');
|
||||
}
|
||||
if (options.internalSharding && ('shardCount' in options || 'shardId' in options)) {
|
||||
throw new TypeError('You cannot specify shardCount/shardId if you are using internal sharding.');
|
||||
}
|
||||
if (!(options.disabledEvents instanceof Array)) throw new TypeError('The disabledEvents option must be an Array.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user