mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
guildCreateTimeout option
This commit is contained in:
@@ -29,6 +29,11 @@ forceFetchUsers
|
||||
|
||||
Make the library get all the users in all guilds, and delay the ready event until all users are received. This will slow down ready times and increase initial network traffic.
|
||||
|
||||
guildCreateTimeout
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
How long in milliseconds to wait for more guilds during the initial ready stream. Default is 1000ms. Increase this number if you are getting some serverCreated events right after ready.
|
||||
|
||||
largeThreshold
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ var Client = (function (_EventEmitter) {
|
||||
this.options.rateLimitAsError = options.rateLimitAsError || false;
|
||||
this.options.largeThreshold = options.largeThreshold || 250;
|
||||
this.options.maxCachedMessages = options.maxCachedMessages || 1000;
|
||||
this.options.guildCreateTimeout = options.guildCreateTimeout || 1000;
|
||||
/**
|
||||
* Internal Client that the Client wraps around.
|
||||
* @readonly
|
||||
|
||||
@@ -462,7 +462,7 @@ var InternalClient = (function () {
|
||||
if (!this.readyTime) {
|
||||
this.guildCreateTimeout = setTimeout(function () {
|
||||
_this6.checkReady();
|
||||
}, 1000);
|
||||
}, this.client.options.guildCreateTimeout);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ export default class Client extends EventEmitter {
|
||||
this.options.rateLimitAsError = options.rateLimitAsError || false;
|
||||
this.options.largeThreshold = options.largeThreshold || 250;
|
||||
this.options.maxCachedMessages = options.maxCachedMessages || 1000;
|
||||
this.options.guildCreateTimeout = options.guildCreateTimeout || 1000;
|
||||
/**
|
||||
* Internal Client that the Client wraps around.
|
||||
* @readonly
|
||||
|
||||
@@ -381,7 +381,7 @@ export default class InternalClient {
|
||||
if(!this.readyTime) {
|
||||
this.guildCreateTimeout = setTimeout(() => {
|
||||
this.checkReady();
|
||||
}, 1000);
|
||||
}, this.client.options.guildCreateTimeout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user