Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
// Using npm
npm install poru
// Using yarn
yarn add poru
To use you need a configured Lavalink instance.
Poru Music Example bot as guide for beginning.
// main file
// Require both libraries
const { Client } = require('discord.js');
const { Poru } = require('poru');
// Initiate both main classes
const client = new Client();
// Define some options for the node
const nodes = [
{
host: 'localhost',
password: 'youshallnotpass',
port: 2333,
secure: false,
},
];
// Define if you want to integrate spotify
const spotifyOptions = {
clientID: 'Your Client ID', // You'll find this on https://developers.spotify.com/dashboard/
clientSecret: 'Your Client Secret', // You'll find this on https://developers.spotify.com/dashboard/
playlistLimit: 10, // The amount of pages to load when a playlist is searched with each page having 50 tracks.
albumLimit: 5, // The amount of pages to load when a album is searched with each page having 50 tracks.
artistLimit: 5, // The amount of pages to load when a artist is searched with each page having 50 tracks.
searchMarket: 'IN', // The market from where the query should be searched from. Mainly this should contain your country.
};
// Assign Manager to the client variable
client.poru = new Poru(client, nodes);
// Emitted whenever a node connects
client.poru.on('nodeConnect', node => {
console.log(`Node "${node.name}" connected.`);
});
// Emitted whenever a node encountered an error
client.poru.on('nodeError', (node, error) => {
console.log(`Node "${node.name}" encountered an error`);
});
// Listen for when the client becomes ready
client.once('ready', () => {
client.poru.init(client);
console.log(`Logged in as ${client.user.tag}`);
});
// this event used to make connections upto date with lavalink
client.on('raw', async d => await client.poru.packetUpdate(d));
// Finally login at the END of your code
client.login('your bot token here');
// creating player
const player = await client.poru.createConnection({
guild: message.guild.id,
voiceChannel: message.member.voice.channel.id,
textChannel: message.channel,
selfDeaf: true,
selfMute: false,
});
// Getting tracks
const resolve = await client.poru.resolve('Ignite', 'yt');
Feel free to join our discord server, Give us suggestions and advice about errors and new features. with ❤️ by Paras .
FAQs
A stable and powerful lavalink client around node.js
The npm package poru receives a total of 257 weekly downloads. As such, poru popularity was classified as not popular.
We found that poru demonstrated a healthy version release cadence and project activity because the last version was released less than 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.