magmastream 2.9.2-dev.8 → 2.9.2-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -524,15 +524,17 @@ class JsonQueue {
524
524
  await fs_1.promises.unlink(filePath);
525
525
  }
526
526
  catch (err) {
527
- const error = err instanceof MagmastreamError_1.MagmaStreamError
528
- ? err
529
- : new MagmastreamError_1.MagmaStreamError({
530
- code: Enums_1.MagmaStreamErrorCode.QUEUE_JSON_ERROR,
531
- message: `Failed to delete file: ${filePath}`,
532
- cause: err,
533
- });
534
- console.error(error);
535
- this.manager.emit(Enums_1.ManagerEventTypes.Debug, `[JSONQUEUE] Failed to delete file: ${filePath}`);
527
+ if (err.code !== "ENOENT") {
528
+ const error = err instanceof MagmastreamError_1.MagmaStreamError
529
+ ? err
530
+ : new MagmastreamError_1.MagmaStreamError({
531
+ code: Enums_1.MagmaStreamErrorCode.QUEUE_JSON_ERROR,
532
+ message: `Failed to delete file: ${filePath}`,
533
+ cause: err,
534
+ });
535
+ console.error(error);
536
+ this.manager.emit(Enums_1.ManagerEventTypes.Debug, `[JSONQUEUE] Failed to delete file: ${filePath}`);
537
+ }
536
538
  }
537
539
  }
538
540
  /**
@@ -570,14 +572,16 @@ class JsonQueue {
570
572
  return JSON.parse(raw);
571
573
  }
572
574
  catch (err) {
573
- const error = err instanceof MagmastreamError_1.MagmaStreamError
574
- ? err
575
- : new MagmastreamError_1.MagmaStreamError({
576
- code: Enums_1.MagmaStreamErrorCode.QUEUE_JSON_ERROR,
577
- message: `Failed to read file: ${filePath}`,
578
- cause: err,
579
- });
580
- console.error(error);
575
+ if (err.code !== "ENOENT") {
576
+ const error = err instanceof MagmastreamError_1.MagmaStreamError
577
+ ? err
578
+ : new MagmastreamError_1.MagmaStreamError({
579
+ code: Enums_1.MagmaStreamErrorCode.QUEUE_JSON_ERROR,
580
+ message: `Failed to read file: ${filePath}`,
581
+ cause: err,
582
+ });
583
+ console.error(error);
584
+ }
581
585
  return null;
582
586
  }
583
587
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magmastream",
3
- "version": "2.9.2-dev.8",
3
+ "version": "2.9.2-dev.9",
4
4
  "description": "A user-friendly Lavalink client designed for NodeJS.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",