🚀 A feature-rich, high-performance Lavalink client (v3 & v4) for Node.js with built-in filters, queue management, and plugin support.
npm install @ramkrishna-js/framelinkA lightweight, robust, and plugin-ready Lavalink client (v3 & v4) for Node.js.




---
``bash`
npm install @ramkrishna-js/framecard
`bash`
npm install @ramkrishna-js/framelink
`typescript
import { LavalinkManager } from '@ramkrishna-js/framelink';
const manager = new LavalinkManager({
nodes: [
{
host: 'localhost',
port: 2333,
password: 'youshallnotpass',
version: 'v4' // or 'v3'
}
],
send: (guildId, payload) => {
// Your library's send logic (Discord.js, Eris, etc.)
}
});
manager.init('YOUR_BOT_ID');
`
`typescript
const player = manager.createPlayer({
guildId: 'GUILD_ID',
voiceChannelId: 'VOICE_CHANNEL_ID',
textChannelId: 'TEXT_CHANNEL_ID',
autoplay: true
});
// Search for a track
const res = await manager.search('Never Gonna Give You Up', 'yt');
// Add to queue and play
player.queue.add(res.tracks[0]);
player.play();
`
`typescriptNode ${node.options.host} connected!
manager.on('nodeConnect', (node) => {
console.log();
});
manager.on('trackStart', (player, track) => {
console.log(Now playing: ${track.info.title});
});
manager.on('queueEnd', (player) => {
console.log(Queue ended for guild ${player.guildId});`
});
FrameLink provides comprehensive control over your music session:
- Pause or resume playback.
- player.resume() - Alias for player.pause(false).
- player.skip() - Skip the current track.
- player.previous() - Play the previous track.
- player.seek(position: number) - Seek to a specific position (ms).
- player.setVolume(volume: number) - Set the player volume (0-1000).
- player.setFilters(filters: any) - Apply Lavalink filters.
- player.connect(options) - Join a voice channel.
- player.disconnect() - Leave a voice channel.$3
- player.queue.add(track | track[]) - Add tracks to the queue.
- player.queue.remove(index) - Remove a track by index.
- player.queue.move(from, to) - Move a track within the queue.
- player.queue.shuffle() - Randomize the queue order.
- player.queue.clear() - Clear all tracks from the queue.
- player.queue.skipTo(index) - Skip directly to a specific track index.
- player.queue.removeDuplicates() - Remove duplicate tracks from the queue.
Aggressive Autoplay
Enable
autoplay: true in your player options to automatically play related tracks when the queue ends. FrameLink uses an aggressive strategy to ensure the music never stops by fetching recommendations based on the previous track's source.
Supported Platforms
FrameLink supports any platform compatible with Lavalink and its plugins (like LavaSrc):
- YouTube / YouTube Music
- Spotify
- Apple Music
- Deezer
- SoundCloud
- Twitch
- HTTP Links
Plugins
FrameLink is built with extensibility in mind. You can easily create and load plugins to extend the manager's functionality.
`typescript
import { Plugin } from '@ramkrishna-js/framelink';class MyCustomPlugin extends Plugin {
name = 'MyPlugin';
load(manager) {
super.load(manager);
console.log('Plugin loaded!');
}
unload() {}
}
const manager = new LavalinkManager({
// ... other options
plugins: [new MyCustomPlugin()]
});
``Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Please see CONTRIBUTING.md for more details.
Distributed under the MIT License. See LICENSE for more information.
Built with ❤️ by Ramkrishna