distube 5.0.7 → 5.1.0

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,52 +19,64 @@
19
19
 
20
20
  # DisTube
21
21
 
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.
22
+ DisTube is a comprehensive Discord music bot library built for [Discord.js](https://discord.js.org), offering simplified music commands, effortless playback from diverse sources, and integrated audio filters.
23
23
 
24
- ## 🌟 Features
24
+ ## 🌟 Key Features
25
25
 
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
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 YouTube, Spotify, SoundCloud, and 700+ other sites.
30
+ - **Type Safety**: Written in TypeScript for a superior development experience.
32
31
 
33
- ## 📋 Requirements
32
+ ## 📚 Resources
34
33
 
35
- - Node.js 18.17.0 or higher
36
- - [discord.js](https://discord.js.org) v14
37
- - [@discordjs/voice](https://github.com/discordjs/voice)
38
- - [@discordjs/opus](https://github.com/discordjs/opus)
39
- - [FFmpeg](https://www.ffmpeg.org/download.html)
34
+ | Resource | Description |
35
+ | --- | --- |
36
+ | [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/skick1234/DisTube) | Learn DisTube with AI-powered assistance. |
37
+ | [Installation](https://deepwiki.com/skick1234/DisTube/Installation) | Detailed requirements and setup guide. |
38
+ | [API Reference](https://distube.js.org/) | Complete technical documentation. |
39
+ | [Discord Support](https://discord.gg/feaDd9h) | Join our community for help and discussion. |
40
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)
47
- - [sodium-native](https://www.npmjs.com/package/sodium-native)
48
-
49
- ## 🚀 Installation
41
+ ## 🚀 Quick Start
50
42
 
51
43
  ```bash
52
44
  npm install distube @discordjs/voice @discordjs/opus
53
45
  ```
54
46
 
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
47
+ ```javascript
48
+ const { DisTube } = require('distube');
49
+ const { Client, GatewayIntentBits } = require('discord.js');
50
+
51
+ const client = new Client({
52
+ intents: [
53
+ GatewayIntentBits.Guilds,
54
+ GatewayIntentBits.GuildVoiceStates,
55
+ GatewayIntentBits.GuildMessages,
56
+ GatewayIntentBits.MessageContent,
57
+ ],
58
+ });
59
+
60
+ const distube = new DisTube(client, {
61
+ emitNewSongOnly: true,
62
+ });
63
+
64
+ distube.on('playSong', (queue, song) =>
65
+ queue.textChannel.send(`Playing \`${song.name}\` - \`${song.formatDuration()}\``)
66
+ );
67
+
68
+ client.on('messageCreate', message => {
69
+ if (message.content.startsWith('!play')) {
70
+ distube.play(message.member.voice.channel, message.content.slice(6), {
71
+ message,
72
+ textChannel: message.channel,
73
+ member: message.member,
74
+ });
75
+ }
76
+ });
77
+
78
+ client.login('TOKEN');
79
+ ```
68
80
 
69
81
  ## 🤝 Contributing
70
82
 
@@ -74,6 +86,8 @@ Contributions are welcome! Please read our [Contributing Guidelines](https://git
74
86
 
75
87
  Licensed under [MIT License](https://github.com/skick1234/DisTube/blob/main/LICENSE)
76
88
 
77
- ## 💖 Support
89
+ ---
78
90
 
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>
91
+ <div align="center">
92
+ <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>
93
+ </div>