Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
herrtxbias_shoukaku
Advanced tools
The ShipGirl Project, feat Shoukaku; ⓒ Kancolle
✅ Straightforward
✅ Stable
✅ Feature-rich
✅ Very cute shipgirl ❤ (Very Important)
For Lavalink Master
branch with commits no newer than https://github.com/freyacodes/Lavalink/commit/45f8de045fdd75034b75c63c410121d8315e6b75
npm i shoukaku@1.5.2
For Lavalink Dev
branch, or anything that doesn't fall into the scope of commits above
npm i shoukaku@1.6.x // Replace x with the latest semver patch available
If you live on the edge, and want any update available on Shoukaku
npm i Deivu/Shoukaku
Download binaries from the CI server or the GitHub releases.
Put an application.yml file in your working directory.
Run with java -jar Lavalink.jar
Docker images are available on the Docker hub.
Bot Implementation: https://github.com/Deivu/Kongou
Basic Implementation:
const { Client } = require('discord.js');
const { Shoukaku } = require('shoukaku');
const LavalinkServer = [{ name: 'Localhost', host: 'localhost', port: 6969, auth: 'big_weeb' }];
const ShoukakuOptions = { moveOnDisconnect: false, resumable: false, resumableTimeout: 30, reconnectTries: 2, restTimeout: 10000 };
class ExampleBot extends Client {
constructor(opts) {
super(opts);
this.shoukaku = new Shoukaku(this, LavalinkServer, ShoukakuOptions);
}
login(token) {
this._setupShoukakuEvents();
this._setupClientEvents();
return super.login(token);
}
_setupShoukakuEvents() {
this.shoukaku.on('ready', (name) => console.log(`Lavalink ${name}: Ready!`));
this.shoukaku.on('error', (name, error) => console.error(`Lavalink ${name}: Error Caught,`, error));
this.shoukaku.on('close', (name, code, reason) => console.warn(`Lavalink ${name}: Closed, Code ${code}, Reason ${reason || 'No reason'}`));
this.shoukaku.on('disconnected', (name, reason) => console.warn(`Lavalink ${name}: Disconnected, Reason ${reason || 'No reason'}`));
}
_setupClientEvents() {
this.on('message', async (msg) => {
if (msg.author.bot || !msg.guild) return;
if (!msg.content.startsWith('$play')) return;
if (this.shoukaku.getPlayer(msg.guild.id)) return;
const args = msg.content.split(' ');
if (!args[1]) return;
const node = this.shoukaku.getNode();
let data = await node.rest.resolve(args[1]);
if (!data) return;
const player = await node.joinVoiceChannel({
guildID: msg.guild.id,
voiceChannelID: msg.member.voice.channelID
});
player.on('error', (error) => {
console.error(error);
player.disconnect();
});
for (const event of ['end', 'closed', 'nodeDisconnect']) player.on(event, () => player.disconnect());
data = data.tracks.shift();
await player.playTrack(data);
await msg.channel.send("Now Playing: " + data.info.title);
});
this.on('ready', () => console.log('Bot is now ready'));
}
}
new ExampleBot()
.login('token')
.catch(console.error);
Made with ❤ by @Sāya#0113
FAQs
A lavalink client for Discord.js v12 only
The npm package herrtxbias_shoukaku receives a total of 0 weekly downloads. As such, herrtxbias_shoukaku popularity was classified as not popular.
We found that herrtxbias_shoukaku 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.