From f15207f8e3c37073366861fd8b502d53107a18ba Mon Sep 17 00:00:00 2001 From: Mogyuchi Date: Mon, 18 Nov 2024 09:29:42 +0900 Subject: [PATCH] refactor: remove unnecessary type casting for voice adapter creator --- src/pipeline.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pipeline.ts b/src/pipeline.ts index 8277c665..1574b506 100644 --- a/src/pipeline.ts +++ b/src/pipeline.ts @@ -9,7 +9,6 @@ import { createAudioPlayer, AudioResource, AudioPlayerStatus, - type DiscordGatewayAdapterCreator, } from "@discordjs/voice"; import { Collection, @@ -51,10 +50,7 @@ export default class Pipeline extends EventEmitter { this.connection ??= joinVoiceChannel({ channelId: this.channel.id, guildId: this.channel.guild.id, - // HACK: voiceAdapterCreator as DiscordGatewayAdapterCreator - // This is due to different versions of `discord-api-types`. - adapterCreator: this.channel.guild - .voiceAdapterCreator as DiscordGatewayAdapterCreator, + adapterCreator: this.channel.guild.voiceAdapterCreator, selfDeaf: true, }); this.player ??= createAudioPlayer();