Skip to content

Commit

Permalink
refactor: remove unnecessary type casting for voice adapter creator (#…
Browse files Browse the repository at this point in the history
…624)

related: #568
  • Loading branch information
Mogyuchi authored Nov 18, 2024
1 parent 2a1e1c9 commit 3b952d8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
createAudioPlayer,
AudioResource,
AudioPlayerStatus,
type DiscordGatewayAdapterCreator,
} from "@discordjs/voice";
import {
Collection,
Expand Down Expand Up @@ -51,10 +50,7 @@ export default class Pipeline extends EventEmitter<PipelineEventsMap> {
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();
Expand Down

0 comments on commit 3b952d8

Please sign in to comment.