add player error
This commit is contained in:
parent
7d7f1131c4
commit
f5f3108cd6
1 changed files with 12 additions and 0 deletions
|
@ -19,6 +19,18 @@ export default async (client: Client, isDev: boolean) => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.events.on("error", (_, error) => {
|
||||||
|
// Emitted when the player queue encounters error
|
||||||
|
console.error(`General player error event: ${error.message}`);
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
player.events.on("playerError", (_, error) => {
|
||||||
|
// Emitted when the audio player errors while streaming audio track
|
||||||
|
console.error(`Player error event: ${error.message}`);
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
|
||||||
events_categories.forEach(async (event_category) => {
|
events_categories.forEach(async (event_category) => {
|
||||||
// Retrieve events
|
// Retrieve events
|
||||||
const events = await readdir(`${__dirname}/${event_category}`);
|
const events = await readdir(`${__dirname}/${event_category}`);
|
||||||
|
|
Loading…
Reference in a new issue