mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Stop the EventEmitter debug warnings when fetching lots of guilds before ready
This commit is contained in:
@@ -63,7 +63,12 @@ class ReadyHandler extends AbstractHandler {
|
||||
client.ws.connection.triggerReady();
|
||||
}, 1200 * data.guilds.length);
|
||||
|
||||
client.once('ready', () => client.clearTimeout(t));
|
||||
client.setMaxListeners(data.guilds.length + 1);
|
||||
|
||||
client.once('ready', () => {
|
||||
client.setMaxListeners(10);
|
||||
client.clearTimeout(t);
|
||||
});
|
||||
|
||||
const ws = this.packetManager.ws;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user