
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
A package that actually syncs your ratelimits across all your clusters on Discord.JS
A package that actually syncs your ratelimits across all your clusters on Discord.JS
The Shipgirl Project; Azuma
✅ An easy drop in solution for those who wants globally synced ratelimits
✅ Follows the original Discord.JS rest manager, so no breaking changes needed to do
✅ Supports Discord.JS v13
npm i --save azuma
Support for options.invalidRequestWarningInterval
Support for options.restGlobalRateLimit
Support for options.rejectOnRateLimit
https://discord.gg/FVqbtGu
#development
channel
Running Azuma is the same with Kurasuta, except on you need to change your index.js based on example below
const { join } = require('path');
const Azuma = require('azuma');
const YourBotClient = require('./YourBotClient.js')
const KurasutaOptions = {
client: YourBotClient,
timeout: 90000,
token: 'idk'
};
const AzumaOptions = {
handlerSweepInterval: 150000,
hashInactiveTimeout: 300000,
requestOffset: 500
};
const azuma = new Azuma(join(__dirname, 'YourBaseCluster.js'), KurasutaOptions, AzumaOptions);
// If you need to access the Kurasuta Sharding Manager, example, you want to listen to shard ready event
azuma.manager.on('shardReady', id => console.log(`Shard ${id} is now ready`));
// Call spawn from azuma, not from kurasuta
azuma.spawn();
Azuma also exposes when a request was made, when a response from a request is received, and if you hit an actul 429 via an event emitter, which you can use to make metrics on
const { Client } = require('discord.js');
class Example extends Client {
constructor(...args) {
super();
this.rest.on('onRequest', ({ request }) => /* do some parses on your thing for metrics or log it idk */);
this.rest.on('onResponse', ({ request, response }) => /* do some parses on your thing for metrics or log it idk */);
this.rest.on('onTooManyRequest', ({ request, response }) => /* do some probably, warning logs here? since this is an actual 429 and can get you banned for an hour */);
}
}
WARNING: DO NOT CHANGE OR RUN ANY FUNCTION FROM THE PARAMETERS. It's designed to be used as read-only values
https://github.com/Deivu/Kongou
Based from my Handling from
@Kashima
, Made with ❤ by @Sāya#0113
FAQs
A package that actually syncs your ratelimits across all your clusters on Discord.JS
The npm package azuma receives a total of 2 weekly downloads. As such, azuma popularity was classified as not popular.
We found that azuma 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.