Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Should AudioPlayer propagate errors from AudioResource? #3

Closed
amishshah opened this issue Feb 3, 2021 · 0 comments
Closed

Should AudioPlayer propagate errors from AudioResource? #3

amishshah opened this issue Feb 3, 2021 · 0 comments

Comments

@amishshah
Copy link
Member

If a user wants to create a resource and catch errors, they will have to do something like this:

const player = createAudioPlayer();
const resource = createAudioResource('input.mp3', options);

resource.playStream.on('error', console.error);

player.play(resource);

They would have to apply the error handler for every resource they create. Maybe it would be better for these errors to be propagated through the AudioPlayer when the resource is connected to it?

@discordjs discordjs locked and limited conversation to collaborators Feb 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant