
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
FastLink is a NodeJs Lavalink client, with a low-level representation of the Lavalink API, with a simple and easy-to-use API.
Able to be installed in most NodeJs versions, and with low memory usage, FastLink is a good choice for your Discord bot.
You can install FastLink through npm:
$ npm i PerformanC/FastLink
And that's it, you'll be able to use FastLink in your project.
import FastLink from 'fastlink'
const events = Lavalink.node.connectNodes([{
hostname: '127.0.0.1',
secure: false,
password: 'youshallnotpass',
port: 2333
}], {
botId: 'Your bot Id here',
shards: 1,
queue: true,
debug: true
})
client.on('messageCreate', async (message) => {
if (message.content.startsWith(prefix + 'decodetrack')) {
const node = Lavalink.player.createPlayer(message.guild.id)
const player = new Lavalink.player.Player(node, message.guild.id)
let track = await player.decodeTrack(message.content.replace(prefix + 'decodetrack ', ''))
return message.channel.send(JSON.stringify(track, null, 2))
}
if (message.content.startsWith(prefix + 'play')) {
if (!message.member.voice.channel) return message.channel.send('You need to be in a voice channel to use this command.')
const node = Lavalink.player.createPlayer(message.guild.id)
const player = new Lavalink.player.Player(node, message.guild.id)
player.connect(message.member.voice.channel.id.toString(), (guildId, payload) => {
client.guilds.cache.get(guildId).shard.send(payload)
})
let track = await player.loadTrack((message.content.replace(prefix + 'play ', '').startsWith('https://') ? '' : 'ytsearch:') + message.content.replace(prefix + 'play ', ''))
if (track.loadType == 'error')
return message.channel.send('Something went wrong. ' + track.data.message)
if (track.loadType == 'empty')
return message.channel.send('No matches found.')
if (track.loadType == 'playlist') {
player.update({ encodedTracks: track.data.tracks.map((track) => track.encoded) })
return message.channel.send(`Added ${track.data.tracks.length} songs to the queue, and playing ${track.data.tracks[0].info.title}.`)
}
if (track.loadType == 'track') {
player.update({ encodedTrack: track.data.encoded, })
return message.channel.send(`Playing ${track.data.info.title} from ${track.data.info.sourceName} from url search.`)
}
if (track.loadType == 'search') {
player.update({ encodedTrack: track.data[0].encoded })
return message.channel.send(`Playing ${track.data[0].info.title} from ${track.data[0].info.sourceName} from search.`)
}
}
// volume
if (message.content.startsWith(prefix + 'volume')) {
const player = Lavalink.player.getPlayer(message.guild.id)
if (!player) return message.channel.send('No player found.')
Lavalink.player.update(player, message.guild.id, {
volume: parseInt(message.content.replace(prefix + 'volume ', ''))
})
}
//pause
if (message.content.startsWith(prefix + 'pause')) {
const node = Lavalink.player.getPlayer(message.guild.id)
if (!node) return message.channel.send('No player found.')
const player = new Lavalink.player.Player(node, message.guild.id)
player.update({ paused: true })
}
//resume
if (message.content.startsWith(prefix + 'resume')) {
const node = Lavalink.player.getPlayer(message.guild.id)
if (!node) return message.channel.send('No player found.')
const player = new Lavalink.player.Player(node, message.guild.id)
player.update({ paused: false })
}
if (message.content.startsWith(prefix + 'skip')) {
const node = Lavalink.player.getPlayer(message.guild.id)
if (!node) return message.channel.send('No player found.')
const player = new Lavalink.player.Player(node, message.guild.id)
const skip = player.skipTrack()
if (skip.skipped) return message.channel.send('Skipped the current track.')
if (!skip.skipped) return message.channel.send('Could not skip the current track.')
}
//stop
if (message.content.startsWith(prefix + 'stop')) {
const node = Lavalink.player.getPlayer(message.guild.id)
if (!node) return message.channel.send('No player found.')
const player = new Lavalink.player.Player(node, message.guild.id)
player.update({ encodedTrack: null })
}
})
client.on('raw', (data) => Lavalink.other.handleRaw(data))
client.login('Your bot token here')
We have a documentation for FastLink, you can find it here. If you have any issue with it, please report it on GitHub Issues.
In case of any issue using it (except bugs, that should be reported on GitHub Issues), you are free to ask on PerformanC's Discord server.
FastLink is licensed under PerformanC's custom license, which is a modified version of the MIT license. You can find it here
The license is made to protect PerformanC's software(s) and to prevent people from stealing our code. You are free to use FastLink in your projects, but you are not allowed to get any part of the code without our permission. You are also not allowed to remove the license from the project.
FAQs
Light-weight Lavalink wrapper using Node.js.
The npm package fastlink receives a total of 26 weekly downloads. As such, fastlink popularity was classified as not popular.
We found that fastlink demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.