fix: event ThreadCreate & MessageCreate not emitted
- bc Discord using new opcode ;-; #1099 #956 #1190
This commit is contained in:
@@ -26,9 +26,6 @@ module.exports = (client, { d: data }, shard) => {
|
|||||||
client.guilds._add(guild);
|
client.guilds._add(guild);
|
||||||
}
|
}
|
||||||
|
|
||||||
const largeGuilds = data.guilds.filter(g => g.large);
|
|
||||||
client.emit('debug', `[READY] Received ${data.guilds.length} guilds, ${largeGuilds.length} large guilds`);
|
|
||||||
|
|
||||||
// User Notes
|
// User Notes
|
||||||
client.notes._reload(data.notes);
|
client.notes._reload(data.notes);
|
||||||
|
|
||||||
@@ -45,11 +42,11 @@ module.exports = (client, { d: data }, shard) => {
|
|||||||
}
|
}
|
||||||
// Todo: data.auth_session_id_hash
|
// Todo: data.auth_session_id_hash
|
||||||
|
|
||||||
if (largeGuilds.length) {
|
if (data.guilds.length) {
|
||||||
client.ws.broadcast({
|
client.ws.broadcast({
|
||||||
op: Opcodes.GUILD_SUBSCRIPTIONS_BULK,
|
op: Opcodes.GUILD_SUBSCRIPTIONS_BULK,
|
||||||
d: {
|
d: {
|
||||||
subscriptions: largeGuilds.reduce((accumulator, guild) => {
|
subscriptions: data.guilds.reduce((accumulator, guild) => {
|
||||||
accumulator[guild.id] = {
|
accumulator[guild.id] = {
|
||||||
typing: true,
|
typing: true,
|
||||||
threads: true,
|
threads: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user