ryanlink 1.0.1 → 1.0.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/dist/index.js CHANGED
@@ -2157,6 +2157,13 @@ var VoiceManager = class {
2157
2157
  }
2158
2158
  currentRequest.reject(new Error("Connection request was replaced"));
2159
2159
  }
2160
+ const state = this.#cache.get(guildId);
2161
+ if (state?.connected && state.channel_id === voiceId) {
2162
+ const voice = this.player.queues.get(guildId)?.voice;
2163
+ if (voice && voice.connected) {
2164
+ return voice;
2165
+ }
2166
+ }
2160
2167
  this.#joins.delete(guildId);
2161
2168
  let resolve;
2162
2169
  let reject;
@@ -2381,6 +2388,7 @@ var VoiceManager = class {
2381
2388
  this.#voices.set(guildId, voice);
2382
2389
  state.connected = true;
2383
2390
  state.node_session_id = voice.node.sessionId ?? "";
2391
+ await queue.sync("remote").catch(noop);
2384
2392
  this.player.emit("voiceConnect", voice);
2385
2393
  request.resolve(voice);
2386
2394
  } catch (error) {