
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
kurasuta is a powerful sharding manager for the discord.js library. It uses Node.js's cluster module to spread shards evenly among all cores.
To download kurasuta, run npm install kurasuta
If you use Yarn, run yarn add kurasuta
To use kurasuta, you can take a look at example
Name | Description |
---|---|
token | Your bot token. It will be used to query the Session endpoint and calculate how many shards to spawn. |
path | path to a file that exports a class extending Cluster . The class must containt a method called "launch". |
options.clientOptions | A object of client options you want to pass to the d.js client constructor. |
options.clusterCount | The number of how many clusters you want. Defaults to the amount of cores |
options.shardCount | The number of how many shards you want. Defaults to the amount that the gateway reccommends, taking into account options.guildsPerShard |
options.development | Boolean to enable development mode. |
options.client | Class extending the d.js client you want to use for your clusters (usefull for Frameworks like Commando , Klasa or Akairo ). Default to d.js Client |
options.guildsPerShard | Number to calculate how many guilds per shard. Defaults to 1000. Ignored if you set shardCount. |
options.respawn | Boolean indicating if exited Clusters should always get restarted. Default to true |
options.ipcSocket | Path to Socket that should be used for IPC connections. Default to //./pipe/tmp/echo.sock on Windows and '/tmp/echo.sock' on Linux |
In every cluster when your code is loaded, you get access to this.client
and this.id
. this.client
is an instance of the Client you provided with nearly no modifications beside the shard
property, d.js build-in ShardClientUtil is replaced by kurasuta's one.
Method | Example | Description | Returns |
---|---|---|---|
broadcastEval | client.shard.broadcastEval(script); | Eval's a script on all Clusters in context of the Client | Promise<any[]> |
masterEval | client.shard.masterEval(script); | Eval a script on the master process in context of the ShardingManager | Promise |
fetchClientValues | client.shard.fetchClientValues(prop); | Fetch a Client value on all Clusters | Promise<any[]> |
restartAll | client.shard.restartAll() | Sends a message to the master process to kill & restart all Clusters | Promise |
restart | client.shard.restart(cluserID) | restart a specific cluster by id | Promise |
send | client.shard.send(data, options) | send a message to the master process | Promise |
In this example our setup look like this:
Project/
├── node-modules/
│ ├── kurasuta
|
├── src/
│ ├── main.js
| ├── index.js
const { Cluster } = require('kurasuta');
module.exports = class extends Cluster {
launch() {
}
}
const { ShardingManager } = require('kurasuta');
const { join } = require('path');
const sharder = new ShardingManager('YOUR_TOKEN', join(__dirname, 'main'), {
// your options here
});
FAQs
A Custom discord.js Sharding Library inspired by eris-sharder.
The npm package kurasuta receives a total of 9 weekly downloads. As such, kurasuta popularity was classified as not popular.
We found that kurasuta 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.