mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
Enable autoReconnect by default
This commit is contained in:
@@ -17,7 +17,7 @@ Client takes an options object, and supports the following options:.
|
|||||||
autoReconnect
|
autoReconnect
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
Have discord.js autoreconnect when connection is lost.
|
Have discord.js autoreconnect when connection is lost. This is enabled by default.
|
||||||
|
|
||||||
compress
|
compress
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ var Client = (function (_EventEmitter) {
|
|||||||
*/
|
*/
|
||||||
this.options = options || {};
|
this.options = options || {};
|
||||||
this.options.compress = options.compress || !process.browser;
|
this.options.compress = options.compress || !process.browser;
|
||||||
this.options.autoReconnect = options.autoReconnect || false;
|
this.options.autoReconnect = options.autoReconnect || true;
|
||||||
this.options.rateLimitAsError = options.rateLimitAsError || false;
|
this.options.rateLimitAsError = options.rateLimitAsError || false;
|
||||||
this.options.largeThreshold = options.largeThreshold || 250;
|
this.options.largeThreshold = options.largeThreshold || 250;
|
||||||
this.options.maxCachedMessages = options.maxCachedMessages || 1000;
|
this.options.maxCachedMessages = options.maxCachedMessages || 1000;
|
||||||
|
|||||||
@@ -249,7 +249,6 @@ var InternalClient = (function () {
|
|||||||
this.resolver = new _ResolverResolver2["default"](this);
|
this.resolver = new _ResolverResolver2["default"](this);
|
||||||
this.readyTime = null;
|
this.readyTime = null;
|
||||||
this.messageAwaits = {};
|
this.messageAwaits = {};
|
||||||
this.retryAfters = {};
|
|
||||||
this.buckets = {
|
this.buckets = {
|
||||||
"bot:msg:dm": new _UtilBucket2["default"](5, 5000),
|
"bot:msg:dm": new _UtilBucket2["default"](5, 5000),
|
||||||
"bot:msg:global": new _UtilBucket2["default"](50, 10000),
|
"bot:msg:global": new _UtilBucket2["default"](50, 10000),
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default class Client extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
this.options = options || {};
|
this.options = options || {};
|
||||||
this.options.compress = options.compress || (!process.browser);
|
this.options.compress = options.compress || (!process.browser);
|
||||||
this.options.autoReconnect = options.autoReconnect || false;
|
this.options.autoReconnect = options.autoReconnect || true;
|
||||||
this.options.rateLimitAsError = options.rateLimitAsError || false;
|
this.options.rateLimitAsError = options.rateLimitAsError || false;
|
||||||
this.options.largeThreshold = options.largeThreshold || 250;
|
this.options.largeThreshold = options.largeThreshold || 250;
|
||||||
this.options.maxCachedMessages = options.maxCachedMessages || 1000;
|
this.options.maxCachedMessages = options.maxCachedMessages || 1000;
|
||||||
|
|||||||
Reference in New Issue
Block a user