An open API service indexing awesome lists of open source software.

https://github.com/toddythenoobdud/aqualink

An Stable, performant, Recourse friendly and fast lavalink wrapper
https://github.com/toddythenoobdud/aqualink

discord-js discord-music-bot high-performance javscript lavalink lavalink-client lavalink-wrapper wrapper youtube

Last synced: 11 months ago
JSON representation

An Stable, performant, Recourse friendly and fast lavalink wrapper

Awesome Lists containing this project

README

          



[![NPM Downloads](https://img.shields.io/npm/dw/aqualink.svg?style=for-the-badge&color=3498db)](https://www.npmjs.com/package/aqualink)
[![NPM Version](https://img.shields.io/npm/v/aqualink?color=0061ff&label=Aqualink&style=for-the-badge&logo=npm)](https://www.npmjs.com/package/aqualink)
[![GitHub Stars](https://img.shields.io/github/stars/ToddyTheNoobDud/AquaLink?color=00bfff&style=for-the-badge&logo=github)](https://github.com/ToddyTheNoobDud/AquaLink/stargazers)
[![Discord](https://img.shields.io/discord/1346930640049803266?color=7289da&label=Discord&logo=discord&style=for-the-badge)](https://discord.gg/K4CVv84VBC)





๐ŸŒŠ REIMAGINING AUDIO STREAMING FOR DISCORD ๐ŸŒŠ


Experience crystal-clear audio with unmatched stability



## ๐Ÿ’Ž Why Choose Aqualink?





๐Ÿš€


Performance First


Optimized architecture with 50% less latency than other wrappers




๐Ÿ› ๏ธ


Developer Friendly


Intuitive API with extensive documentation and CJS/ESM support




๐Ÿ”Œ


Extendable


Plugin ecosystem for custom functionality and seamless integration





## ๐Ÿ“ฆ Installation
**Latest Stable Release: `v2.11.7`** โ€ข **Choose your preferred package manager below**

๐Ÿ“ฆ NPM (Most Popular)

```bash
# ๐ŸŽฏ Stable release (recommended for production)
npm install aqualink

# ๐Ÿšง Latest development build
npm install ToddyTheNoobDud/aqualink
```

๐Ÿงถ Yarn (Fast & Reliable)

```bash
# ๐ŸŽฏ Stable release (recommended for production)
yarn add aqualink

# ๐Ÿšง Latest development build
yarn add ToddyTheNoobDud/aqualink
```

โšก Bun (Lightning Fast)

```bash
# ๐ŸŽฏ Stable release (recommended for production)
bun add aqualink

# ๐Ÿšง Latest development build
bun add ToddyTheNoobDud/aqualink
```

๐Ÿ“ฆ pnpm (Space Efficient)

```bash
# ๐ŸŽฏ Stable release (recommended for production)
pnpm add aqualink

# ๐Ÿšง Latest development build
pnpm add ToddyTheNoobDud/aqualink
```

## ๐Ÿ”ฅ Feature Highlights






Advanced Filters


EQ, Bass Boost, Nightcore & more





Fail-Safe System


Auto-reconnect & queue preservation





Real-time Analytics


Performance monitoring & insights





Customizable


Adapt to your specific needs





## ๐Ÿ“ฆ Resources





## ๐Ÿ’ป Quick Start

```bash
npm install aqualink discord.js
```

```javascript
const { Aqua } = require("aqualink");
const { Client, GatewayIntentBits, Events } = require("discord.js");

const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildVoiceStates
]
});

const nodes = [
{
host: "127.0.0.1",
password: "your_password",
port: 2333,
secure: false,
name: "main-node"
}
];

const aqua = new Aqua(client, nodes, {
defaultSearchPlatform: "ytsearch",
restVersion: "v4",
autoResume: true,
infiniteReconnects: true,
autoplayPlatform: ['spsearch', 'ytsearch', 'scsearch'],
nodeResolver: 'LeastLoad'
});

client.aqua = aqua;

client.once(Events.Ready, () => {
client.aqua.init(client.user.id);
console.log(`Logged in as ${client.user.tag}`);
});

client.on(Events.Raw, (d) => {
if (![Events.VoiceStateUpdate, Events.VoiceServerUpdate].includes(d.t)) return;
client.aqua.updateVoiceState(d);
});

client.on(Events.MessageCreate, async (message) => {
if (message.author.bot || !message.content.startsWith("!play")) return;

const query = message.content.slice(6).trim();
if (!query) return message.channel.send("Please provide a song to play.");

// Check if user is in a voice channel
if (!message.member.voice.channel) {
return message.channel.send("You need to be in a voice channel to play music!");
}

const player = client.aqua.createConnection({
guildId: message.guild.id,
voiceChannel: message.member.voice.channel.id,
textChannel: message.channel.id,
deaf: true,
});

try {
const resolve = await client.aqua.resolve({ query, requester: message.member });
const { loadType, tracks, playlistInfo } = resolve;

if (loadType === 'playlist') {
for (const track of tracks) {
player.queue.add(track);
}
message.channel.send(`Added ${tracks.length} songs from ${playlistInfo.name}.`);
} else if (loadType === 'search' || loadType === 'track') {
const track = tracks[0];
player.queue.add(track);
message.channel.send(`Added **${track.title}** to the queue.`);
} else {
return message.channel.send("No results found.");
}

if (!player.playing && !player.paused) {
player.play();
}
} catch (error) {
console.error("Playback error:", error);
message.channel.send("An error occurred while trying to play the song.");
}
});

client.aqua.on("nodeConnect", (node) => {
console.log(`Node connected: ${node.name}`);
});

client.aqua.on("nodeError", (node, error) => {
console.log(`Node "${node.name}" encountered an error: ${error.message}.`);
});

client.aqua.on('trackStart', (player, track) => {
const channel = client.channels.cache.get(player.textChannel);
if (channel) channel.send(`Now playing: **${track.title}**`);
});

client.aqua.on('queueEnd', (player) => {
const channel = client.channels.cache.get(player.textChannel);
if (channel) channel.send('The queue has ended.');
player.destroy();
});

client.login("YOUR_DISCORD_BOT_TOKEN");
```

### Additional Commands You Can Add:

```javascript
client.on(Events.MessageCreate, async (message) => {
if (message.content === "!skip") {
const player = client.aqua.players.get(message.guild.id);
if (player) {
player.skip();
message.channel.send("โญ๏ธ Skipped current track!");
}
}
});

client.on(Events.MessageCreate, async (message) => {
if (message.content === "!stop") {
const player = client.aqua.players.get(message.guild.id);
if (player) {
player.destroy();
message.channel.send("โน๏ธ Stopped playback and cleared queue!");
}
}
});
```

## ๐ŸŒŸ Featured Projects






Add to Discord






Add to Discord

[View All Projects โ†’](https://github.com/ToddyTheNoobDud/AquaLink#used-by)

**300+** weekly downloads โ€ข **3+** GitHub stars โ€ข **3+** Discord bots

## ๐Ÿ“– Documentation

For detailed usage, API references, and examples, check out our official documentation:

[![Docs](https://img.shields.io/badge/Documentation-0099FF?style=for-the-badge&logo=readthedocs&logoColor=white)](https://roddynnn.github.io/docs/)

๐Ÿ“Œ **Get Started Quickly**
- Installation guide
- API methods
- Advanced features
- Troubleshooting

๐Ÿ”— Visit: **[Aqualink Docs](https://roddynnn.github.io/docs)**

## ๐Ÿ‘‘ Premium Bots Using Aqualink

| Bot | Invite Link | Features |
|-----|-------------|----------|
| Kenium | [Add to Discord](https://discord.com/oauth2/authorize?client_id=1202232935311495209) | Audio streaming, Discord integration |
| Soya Music | [Add to Discord](https://discord.com/oauth2/authorize?client_id=997906613082013868&permissions=281357446481&integration_type=0&scope=bot+applications.commands) | Audio streaming, Discord integration |

## ๐Ÿ› ๏ธ Advanced Features





๐ŸŽ›๏ธ Audio Filters



  • Equalizer (15-band)

  • Bass Boost & Bass Cut

  • Nightcore & Vaporwave

  • 8D Audio & Rotation

  • Karaoke & Channel Mixing




๐Ÿ”„ Queue Management



  • Shuffle & Loop modes

  • Queue history & navigation

  • Auto playlist continuation

  • Skip voting systems

  • Playlist import/export




๐Ÿ“Š Monitoring



  • Resource utilization

  • Performance metrics

  • Automatic issue detection

  • Node health tracking

  • Load balancing





## ๐Ÿ‘ฅ Contributors





pomicee


asynico



๐Ÿ’ป
๐Ÿ“–



ToddyTheNoobDud


ToddyTheNoobDud



๐Ÿ’ป
๐Ÿ“–



SoulDevs


SoulDevs



๐Ÿ’ป



[Become a contributor โ†’](CONTRIBUTING.md)

## ๐Ÿค Contributing

We welcome contributions from developers of all skill levels! Whether it's adding features, fixing bugs, or improving documentation.

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-0061ff.svg?style=for-the-badge)](CONTRIBUTING.md)

## ๐Ÿ’ฌ Community & Support

Join our thriving community of developers and bot creators!

[![Discord Server](https://img.shields.io/badge/Discord_Server-7289da?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/K4CVv84VBC)
[![GitHub Discussions](https://img.shields.io/badge/GitHub_Discussions-0061ff?style=for-the-badge&logo=github&logoColor=white)](https://github.com/ToddyTheNoobDud/AquaLink/discussions)




Built with ๐Ÿ’™ by the Aqualink Team