Skip to content

Commit

Permalink
Fix type error with using on instead of once
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuroXina committed Jun 23, 2024
1 parent b257423 commit 683f4cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/bot/src/adaptor/discord/voice.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
type AudioPlayer,
AudioPlayer,
AudioPlayerStatus,
type VoiceConnection as RawVoiceConnection,
VoiceConnectionStatus,
Expand All @@ -15,7 +15,7 @@ import {
} from 'discord.js';

import type { Snowflake } from '../../model/id.js';
import type { VoiceRoomController } from '../../service/command/kaere.js';
import type { VoiceRoomController } from '../../model/voice-room-controller.js';
import type {
VoiceConnection,
VoiceConnectionFactory
Expand Down Expand Up @@ -77,8 +77,8 @@ export class DiscordVoiceConnection<K extends string | number | symbol>
return new Promise((resolve, reject) => {
const resource = createAudioResource(this.audioRecord[key]);

this.player.once('error', reject);
this.player.once(AudioPlayerStatus.Idle, () => {
this.player.on('error', reject);
this.player.on(AudioPlayerStatus.Idle, () => {

Check warning on line 81 in packages/bot/src/adaptor/discord/voice.ts

View check run for this annotation

Codecov / codecov/patch

packages/bot/src/adaptor/discord/voice.ts#L80-L81

Added lines #L80 - L81 were not covered by tests
resolve();
});

Expand Down

0 comments on commit 683f4cc

Please sign in to comment.