attach backup adapter creator
This commit is contained in:
parent
f1f124195c
commit
395f928e2e
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
import { VoiceChannel, StageChannel, Collection, Snowflake } from "discord.js";
|
||||
import { DiscordGatewayAdapterCreator, entersState, joinVoiceChannel, VoiceConnection, VoiceConnectionStatus } from "@discordjs/voice";
|
||||
import { StreamDispatcher } from "./BasicStreamDispatcher";
|
||||
import { VoiceAdapterCreator } from "./AdapterCreator";
|
||||
|
||||
class VoiceUtils {
|
||||
public cache: Collection<Snowflake, StreamDispatcher>;
|
||||
|
@ -53,7 +54,7 @@ class VoiceUtils {
|
|||
let conn = joinVoiceChannel({
|
||||
guildId: channel.guild.id,
|
||||
channelId: channel.id,
|
||||
adapterCreator: options.adapter ?? (channel.guild as any).voiceAdapterCreator, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
adapterCreator: options.adapter ?? (channel.guild as any).voiceAdapterCreator ?? VoiceAdapterCreator(channel), // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
selfDeaf: Boolean(options.deaf)
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue