@satorijs/adapter-discord 3.4.1 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1435,7 +1435,7 @@ var WsClient = class extends import_satori3.Adapter.WsClient {
1435
1435
  this._sessionId = "";
1436
1436
  }
1437
1437
  prepare() {
1438
- return this.bot.http.ws(this.bot.config.gateway);
1438
+ return this.bot.http.ws(this._resumeUrl || this.bot.config.gateway);
1439
1439
  }
1440
1440
  heartbeat() {
1441
1441
  logger.debug(`heartbeat d ${this._d}`);
@@ -1485,6 +1485,7 @@ var WsClient = class extends import_satori3.Adapter.WsClient {
1485
1485
  if (parsed.op === 0 /* DISPATCH */) {
1486
1486
  if (parsed.t === "READY") {
1487
1487
  this._sessionId = parsed.d.session_id;
1488
+ this._resumeUrl = parsed.d.resume_gateway_url;
1488
1489
  const self = adaptUser(parsed.d.user);
1489
1490
  self.selfId = self.userId;
1490
1491
  delete self.userId;