diff --git a/src/client/Client.js b/src/client/Client.js index c9e0e09e2..107a2f0e9 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -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.'); } } diff --git a/src/util/Constants.js b/src/util/Constants.js index 64d9e5963..9bee754b0 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -34,6 +34,7 @@ exports.DefaultOptions = { apiRequestMethod: 'sequential', shardId: 0, shardCount: 0, + internalSharding: false, messageCacheMaxSize: 200, messageCacheLifetime: 0, messageSweepInterval: 0,