Skip to content

Commit

Permalink
fix: fix voice connection events
Browse files Browse the repository at this point in the history
  • Loading branch information
markokajzer committed Mar 6, 2020
1 parent 38396c0 commit 3f64138
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/queue/SoundQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class SoundQueue {
public next() {
if (!this.dispatcher) return;

this.dispatcher.emit('end');
this.dispatcher.emit('finish');
}

public clear() {
Expand Down Expand Up @@ -88,7 +88,8 @@ export default class SoundQueue {
return new Promise(resolve => {
this.dispatcher = connection
.play(name, { volume: this.config.volume })
.on('end', () => resolve(connection));
.on('finish', () => resolve(connection))
.on('close', () => resolve(connection));
});
}

Expand Down

0 comments on commit 3f64138

Please sign in to comment.