hotfix /testing

This commit is contained in:
NoLogicAlan committed 2026-06-17 03:26:46 +03:00
1 parent b7252fccaf
commit dbe1c46dc5
5 files changed
+53 -16

No files matched your search

+7 -2
View File
@@ -572,14 +572,19 @@ export class MessageHandler {
}
/**
* Join a voice channel using the documented VoiceManager.join() API.
* Reference: https://fluxer.js.org/v/latest/guides/voice
*
* @param {string} channelId
* @returns {Promise<import("@fluxerjs/voice").VoiceConnectionLike>}
*/
async joinChannel(channelId) {
const { joinVoiceChannel } = await import("@fluxerjs/voice");
const { getVoiceManager } = await import("@fluxerjs/voice");
const channel = await this.client.channels.fetch(channelId);
if (!channel || !("guildId" in channel)) throw new Error("Cannot join a non-guild voice channel.");
return joinVoiceChannel(this.client, channel);
const vm = getVoiceManager(this.client);
if (!vm) throw new Error("VoiceManager not available.");
return vm.join(channel);
}
}