From 8898a91ed0ecf18d91f5cbd1375f8fb7e4726ea3 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sun, 25 Dec 2022 18:37:56 +0700 Subject: [PATCH] chore: update buildNumber --- src/client/websocket/WebSocketShard.js | 2 +- src/util/Intents.js | 2 ++ src/util/Options.js | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/client/websocket/WebSocketShard.js b/src/client/websocket/WebSocketShard.js index df90240..fe6622a 100644 --- a/src/client/websocket/WebSocketShard.js +++ b/src/client/websocket/WebSocketShard.js @@ -425,7 +425,7 @@ class WebSocketShard extends EventEmitter { this.emit(ShardEvents.READY); this.sessionId = packet.d.session_id; - this.expectedGuilds = new Set(packet.d.guilds.filter(d => d.unavailable).map(d => d.id)); + this.expectedGuilds = new Set(packet.d.guilds.filter(d => d?.unavailable == true).map(d => d.id)); this.status = Status.WAITING_FOR_GUILDS; this.debug(`[READY] Session ${this.sessionId}.`); this.lastHeartbeatAcked = true; diff --git a/src/util/Intents.js b/src/util/Intents.js index 77f856e..95239c5 100644 --- a/src/util/Intents.js +++ b/src/util/Intents.js @@ -69,4 +69,6 @@ Intents.FLAGS = { AUTO_MODERATION_EXECUTION: 1 << 21, }; +Intents.ALL = Object.values(Intents.FLAGS).reduce((all, p) => all | p, 0); + module.exports = Intents; diff --git a/src/util/Options.js b/src/util/Options.js index 38c0dca..25b6d6d 100644 --- a/src/util/Options.js +++ b/src/util/Options.js @@ -1,6 +1,7 @@ 'use strict'; const JSONBig = require('json-bigint'); +const Intents = require('./Intents'); const { randomUA } = require('../util/Constants'); /** * Rate limit data @@ -167,7 +168,7 @@ class Options extends null { messageCacheLifetime: 0, messageSweepInterval: 0, invalidRequestWarningInterval: 0, - intents: 131071, + intents: Intents.ALL, partials: ['USER', 'CHANNEL', 'GUILD_MEMBER', 'MESSAGE', 'REACTION', 'GUILD_SCHEDULED_EVENT'], // Enable the partials restWsBridgeTimeout: 5_000, restRequestTimeout: 15_000, @@ -195,7 +196,7 @@ class Options extends null { referrer_current: '', referring_domain_current: '', release_channel: 'stable', - client_build_number: 163275, + client_build_number: 165485, client_event_source: null, }, // ! capabilities: 4093,