distube 5.0.5 → 5.0.6

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.
package/dist/index.mjs CHANGED
@@ -83,7 +83,7 @@ var ERROR_MESSAGES = {
83
83
  VOICE_DIFFERENT_CLIENT: "Cannot join a voice channel created by a different client",
84
84
  FFMPEG_EXITED: /* @__PURE__ */ __name((code) => `ffmpeg exited with code ${code}`, "FFMPEG_EXITED"),
85
85
  FFMPEG_NOT_INSTALLED: /* @__PURE__ */ __name((path) => `ffmpeg is not installed at '${path}' path`, "FFMPEG_NOT_INSTALLED"),
86
- ENCRYPTION_LIBRARIES_MISSING: "Cannot play audio as no valid encryption package is installed.\nPlease install sodium-native, sodium, libsodium-wrappers, or tweetnacl.",
86
+ ENCRYPTION_LIBRARIES_MISSING: "Cannot play audio as no valid encryption package is installed and your node doesn't support aes-256-gcm.\nPlease install @noble/ciphers, @stablelib/xchacha20poly1305, sodium-native or libsodium-wrappers.",
87
87
  NO_QUEUE: "There is no playing queue in this guild",
88
88
  QUEUE_EXIST: "This guild has a Queue already",
89
89
  QUEUE_STOPPED: "The queue has been stopped already",
@@ -2024,7 +2024,15 @@ function isNsfwChannel(channel) {
2024
2024
  __name(isNsfwChannel, "isNsfwChannel");
2025
2025
  var isTruthy = /* @__PURE__ */ __name((x) => Boolean(x), "isTruthy");
2026
2026
  var checkEncryptionLibraries = /* @__PURE__ */ __name(async () => {
2027
- for (const lib of ["sodium-native", "sodium", "libsodium-wrappers", "tweetnacl"]) {
2027
+ if (await import("node:crypto").then((m) => m.getCiphers().includes("aes-256-gcm"))) return true;
2028
+ for (const lib of [
2029
+ "@noble/ciphers",
2030
+ "@stablelib/xchacha20poly1305",
2031
+ "sodium-native",
2032
+ "sodium",
2033
+ "libsodium-wrappers",
2034
+ "tweetnacl"
2035
+ ]) {
2028
2036
  try {
2029
2037
  await import(lib);
2030
2038
  return true;
@@ -2423,7 +2431,7 @@ ${e.message}`;
2423
2431
  };
2424
2432
 
2425
2433
  // src/index.ts
2426
- var version = "5.0.5";
2434
+ var version = "5.0.6";
2427
2435
  export {
2428
2436
  BaseManager,
2429
2437
  DisTube,