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/README.md CHANGED
@@ -19,31 +19,61 @@
19
19
 
20
20
  # DisTube
21
21
 
22
- A powerful Discord.js module for simplifying music commands and effortless playback of various sources with integrated audio filters.
22
+ DisTube is a comprehensive Discord music bot library built for Discord.js, offering simplified music commands, effortless playback from diverse sources, and integrated audio filters.
23
23
 
24
- [DisTube Support Server](https://discord.gg/feaDd9h) - [Frequently Asked Questions](https://discord.gg/feaDd9h)
24
+ ## 🌟 Features
25
25
 
26
- ## Features
26
+ - **Easy Integration**: Built on top of [discord.js](https://discord.js.org) v14 and [@discordjs/voice](https://discord.js.org)
27
+ - **Voice Management**: Robust handling of voice connections and queue management
28
+ - **Audio Filters**: Built-in filters (bassboost, echo, karaoke, etc.) and custom filter support
29
+ - **Plugin System**: Extensible architecture supporting various music sources through plugins
30
+ - **Type Safety**: Written in TypeScript for better development experience
31
+ - **Active Community**: Join our [Discord Support Server](https://discord.gg/feaDd9h) for help
27
32
 
28
- - Easy Integration: Built on top of [discord.js](https://discord.js.org) v14 and [@discordjs/voice](https://discord.js.org).
29
- - Voice and Queue Management: Handles voice channel connections, disconnections, and manages music queues efficiently.
30
- - Audio Filters: Offers built-in audio filters (bassboost, echo, karaoke, etc.) and allows for custom filter implementations.
31
- - Plugin System: Supports extensibility through plugins
32
- > DisTube does not have built-in support for music sources. You need to use plugins to add support for them.
33
-
34
- ## Requirement
33
+ ## 📋 Requirements
35
34
 
36
35
  - Node.js 18.17.0 or higher
37
36
  - [discord.js](https://discord.js.org) v14
38
37
  - [@discordjs/voice](https://github.com/discordjs/voice)
39
38
  - [@discordjs/opus](https://github.com/discordjs/opus)
40
39
  - [FFmpeg](https://www.ffmpeg.org/download.html)
40
+
41
+ ### 🔒 Encryption Libraries
42
+
43
+ > [!NOTE]
44
+ > You only need to install one of these libraries if your system does not support `aes-256-gcm` (verify by running `require('node:crypto').getCiphers().includes('aes-256-gcm')`).
45
+
46
+ - [@noble/ciphers](https://www.npmjs.com/package/@noble/ciphers)
41
47
  - [sodium-native](https://www.npmjs.com/package/sodium-native)
42
48
 
43
- ## Documentation
49
+ ## 🚀 Installation
50
+
51
+ ```bash
52
+ npm install distube @discordjs/voice @discordjs/opus
53
+ ```
54
+
55
+ For FFmpeg installation:
56
+
57
+ - [Windows Guide](http://blog.gregzaal.com/how-to-install-ffmpeg-on-windows/)
58
+ - [Linux Guide](https://www.tecmint.com/install-ffmpeg-in-linux/)
59
+
60
+ > [!NOTE]
61
+ > Alternative FFmpeg builds available [here](https://github.com/BtbN/FFmpeg-Builds/releases)
62
+
63
+ ## 📚 Documentation
64
+
65
+ - [API Documentation](https://distube.js.org/) - Detailed API reference
66
+ - [DisTube Guide](https://github.com/skick1234/DisTube/wiki) - Step-by-step guide for beginners
67
+ - [Plugin List](https://github.com/skick1234/DisTube/wiki/Projects-Hub#plugins) - Available plugins for music sources
68
+
69
+ ## 🤝 Contributing
70
+
71
+ Contributions are welcome! Please read our [Contributing Guidelines](https://github.com/skick1234/DisTube/blob/main/.github/CONTRIBUTING.md) before submitting a pull request.
72
+
73
+ ## 📄 License
44
74
 
45
- Read DisTube's definitions, properties and events details in the [API Documentation page](https://distube.js.org/).
75
+ Licensed under [MIT License](https://github.com/skick1234/DisTube/blob/main/LICENSE)
46
76
 
47
- Learn how to build a music bot from scratch with [DisTube Guide](https://github.com/skick1234/DisTube/wiki)
77
+ ## 💖 Support
48
78
 
49
- [List of plugins](https://github.com/skick1234/DisTube/wiki/Projects-Hub#plugins) for supporting various sites
79
+ <a href='https://ko-fi.com/skick' target='_blank'><img height='48' src='https://storage.ko-fi.com/cdn/kofi3.png' alt='Support me on Ko-fi' /></a>
package/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
9
  var __export = (target, all) => {
@@ -16,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
16
18
  }
17
19
  return to;
18
20
  };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
19
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
30
 
21
31
  // src/index.ts
@@ -152,7 +162,7 @@ var ERROR_MESSAGES = {
152
162
  VOICE_DIFFERENT_CLIENT: "Cannot join a voice channel created by a different client",
153
163
  FFMPEG_EXITED: /* @__PURE__ */ __name((code) => `ffmpeg exited with code ${code}`, "FFMPEG_EXITED"),
154
164
  FFMPEG_NOT_INSTALLED: /* @__PURE__ */ __name((path) => `ffmpeg is not installed at '${path}' path`, "FFMPEG_NOT_INSTALLED"),
155
- ENCRYPTION_LIBRARIES_MISSING: "Cannot play audio as no valid encryption package is installed.\nPlease install sodium-native, sodium, libsodium-wrappers, or tweetnacl.",
165
+ 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.",
156
166
  NO_QUEUE: "There is no playing queue in this guild",
157
167
  QUEUE_EXIST: "This guild has a Queue already",
158
168
  QUEUE_STOPPED: "The queue has been stopped already",
@@ -2086,7 +2096,15 @@ function isNsfwChannel(channel) {
2086
2096
  __name(isNsfwChannel, "isNsfwChannel");
2087
2097
  var isTruthy = /* @__PURE__ */ __name((x) => Boolean(x), "isTruthy");
2088
2098
  var checkEncryptionLibraries = /* @__PURE__ */ __name(async () => {
2089
- for (const lib of ["sodium-native", "sodium", "libsodium-wrappers", "tweetnacl"]) {
2099
+ if (await import("crypto").then((m) => m.getCiphers().includes("aes-256-gcm"))) return true;
2100
+ for (const lib of [
2101
+ "@noble/ciphers",
2102
+ "@stablelib/xchacha20poly1305",
2103
+ "sodium-native",
2104
+ "sodium",
2105
+ "libsodium-wrappers",
2106
+ "tweetnacl"
2107
+ ]) {
2090
2108
  try {
2091
2109
  await import(lib);
2092
2110
  return true;
@@ -2485,7 +2503,7 @@ ${e.message}`;
2485
2503
  };
2486
2504
 
2487
2505
  // src/index.ts
2488
- var version = "5.0.5";
2506
+ var version = "5.0.6";
2489
2507
  // Annotate the CommonJS export names for ESM import in node:
2490
2508
  0 && (module.exports = {
2491
2509
  BaseManager,