fix: speedup start
This commit is contained in:
parent
8898a91ed0
commit
d491e77913
@ -4,6 +4,7 @@ const { Events, Opcodes, Status } = require('../../../util/Constants');
|
||||
|
||||
// Receive messages in large guilds
|
||||
const run = (client, guild) => {
|
||||
if (!guild.large) return;
|
||||
client.ws.broadcast({
|
||||
op: Opcodes.LAZY_REQUEST,
|
||||
d: {
|
||||
|
@ -141,8 +141,12 @@ module.exports = async (client, { d: data }, shard) => {
|
||||
client.guilds._add(guild);
|
||||
}
|
||||
|
||||
const largeGuilds = data.guilds.filter(g => g.large);
|
||||
|
||||
client.emit('debug', `Received ${data.guilds.length} guilds, ${largeGuilds.length} large guilds`);
|
||||
|
||||
// Receive messages in large guilds
|
||||
for (const guild of data.guilds) {
|
||||
for (const guild of largeGuilds) {
|
||||
await client.sleep(client.options.messageCreateEventGuildTimeout);
|
||||
client.ws.broadcast({
|
||||
op: Opcodes.LAZY_REQUEST,
|
||||
|
Loading…
Reference in New Issue
Block a user