distube 5.0.6 → 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 +52 -38
- package/dist/index.d.mts +472 -464
- package/dist/index.d.ts +474 -464
- package/dist/index.js +1616 -1613
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1614 -1611
- package/dist/index.mjs.map +1 -1
- package/package.json +26 -32
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
|
|
30
|
-
- **Type Safety**: Written in TypeScript for
|
|
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
|
-
##
|
|
32
|
+
## 📚 Resources
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
| Resource | Description |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| [](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
|
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
89
|
+
---
|
|
78
90
|
|
|
79
|
-
<
|
|
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>
|