v2.1.0
fix: ClientUser.notes return empty Collection fix: Recieve messages from large servers #72 feat: checkUpdate return Debug event (not console.log) feat: RelationshipAdd event, param type return RelationshipTypes feat: online status when login feat: fix documents
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
const { Events, Status } = require('../../../util/Constants');
|
||||
const { Events, Opcodes, Status } = require('../../../util/Constants');
|
||||
|
||||
// Receive messages in large guilds
|
||||
const run = (client, guild) => {
|
||||
client.ws.broadcast({
|
||||
op: Opcodes.LAZY_REQUEST,
|
||||
d: {
|
||||
guild_id: guild.id,
|
||||
typing: true,
|
||||
threads: false,
|
||||
activities: true,
|
||||
thread_member_lists: [],
|
||||
members: [],
|
||||
channels: {
|
||||
// [guild.channels.cache.first().id]: [[0, 99]],
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = (client, { d: data }, shard) => {
|
||||
let guild = client.guilds.cache.get(data.id);
|
||||
@@ -8,6 +26,7 @@ module.exports = (client, { d: data }, shard) => {
|
||||
if (!guild.available && !data.unavailable) {
|
||||
// A newly available guild
|
||||
guild._patch(data);
|
||||
run(client, guild);
|
||||
}
|
||||
} else {
|
||||
// A new guild
|
||||
@@ -20,6 +39,7 @@ module.exports = (client, { d: data }, shard) => {
|
||||
* @param {Guild} guild The created guild
|
||||
*/
|
||||
client.emit(Events.GUILD_CREATE, guild);
|
||||
run(client, guild);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user