{"id":19577158,"url":"https://github.com/shipgirlproject/azuma","last_synced_at":"2025-04-27T06:32:11.284Z","repository":{"id":37828164,"uuid":"352347268","full_name":"shipgirlproject/Azuma","owner":"shipgirlproject","description":"A package that actually syncs your ratelimits across all your clusters on Discord.JS","archived":false,"fork":false,"pushed_at":"2022-06-16T04:44:02.000Z","size":191,"stargazers_count":17,"open_issues_count":1,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-09T17:06:18.823Z","etag":null,"topics":["bot","discord","discord-bot","discord-js","discord-ratelimits","discordjs","nodejs","ratelimits","sharding"],"latest_commit_sha":null,"homepage":"https://deivu.github.io/Azuma/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shipgirlproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-28T14:12:05.000Z","updated_at":"2023-11-04T05:05:56.000Z","dependencies_parsed_at":"2022-06-23T06:17:21.568Z","dependency_job_id":null,"html_url":"https://github.com/shipgirlproject/Azuma","commit_stats":null,"previous_names":["deivu/wa2000","shipgirlproject/azuma","deivu/azuma"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FAzuma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FAzuma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FAzuma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FAzuma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shipgirlproject","download_url":"https://codeload.github.com/shipgirlproject/Azuma/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224062795,"owners_count":17249291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","discord","discord-bot","discord-js","discord-ratelimits","discordjs","nodejs","ratelimits","sharding"],"created_at":"2024-11-11T07:04:46.298Z","updated_at":"2024-11-11T07:04:48.157Z","avatar_url":"https://github.com/shipgirlproject.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azuma\nA package that actually syncs your ratelimits across all your clusters on Discord.JS\n\n\u003e The Shipgirl Project; [Azuma](https://azurlane.koumakan.jp/Azuma)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://azurlane.netojuu.com/w/images/4/42/Azuma.png\"\u003e\n\u003c/p\u003e\n\n## EOL \n\u003e Discord.JS started developing their \"proxy\" module, marking the end of EOL of this package. Use that instead\n\n\u003e Link: https://github.com/discordjs/discord.js/tree/main/packages/proxy\n\n## Features\n\n✅ An easy drop in solution for those who wants globally synced ratelimits\n\n✅ Follows the original Discord.JS rest manager, so no breaking changes needed\n\n✅ Supports Discord.JS v13\n\n\n## NOTE\n\n\u003e This library is now in \"Maintenance\" phase. I'm not gonna add new features on it. I'll just fix issues if there is but that's as far as I'll go.\n\n\u003e You need to use [Kurasuta](https://github.com/DevYukine/Kurasuta) to make this work as this package depends on it\n\n\u003e This is planned to use `@discordjs/sharder` once it's ready. That's the last update and marks the v4 release\n\n\u003e v1.x.x initial release (Latest in 1x branch is version: 1.1.0)\n\n\u003e v2.x.x drops support for Discord.JS v12 (Latest in 2x branch is version: 2.1.2)\n\n\u003e v3.x.x makes the package ESM only (Current)\n\n## Installation\n\n\u003e npm i --save azuma\n\n## Documentation\n\n\u003e https://deivu.github.io/Azuma/?api\n\n## Support\n\u003e https://discord.gg/FVqbtGu `#development` channel\n\n## Example\n\u003e Running Azuma is the same with [Kurasuta](https://github.com/DevYukine/Kurasuta#example), except on you need to change your index.js based on example below\n\n## Example of index.js\n```js\nimport { Azuma } from 'azuma';\nimport { Client } = from 'discord.js';\n\nconst KurasutaOptions = {\n    client: YourBotClient,\n    timeout: 90000,\n    token: 'idk'\n};\nconst AzumaOptions = {\n    inactiveTimeout: 300000,\n    requestOffset: 500\n};\n// Initialize Azuma\nconst azuma = new Azuma(new URL('BaseCluster.js', import.meta.url), KurasutaOptions, AzumaOptions);\n// If you need to access the Kurasuta Sharding Manager, example, you want to listen to shard ready event\nazuma.manager.on('shardReady', id =\u003e console.log(`Shard ${id} is now ready`));\n// Call spawn from azuma, not from kurasuta\nazuma.spawn();\n```\n\n## Pro Tip\n\u003e Azuma also exposes when a request was made, when a response from a request is received, and if you hit an actual 429 via an event emitter, which you can use to make metrics on\n```js\nimport { Client } = from 'discord.js';\n\nclass Example extends Client {\n  login() {\n    this.rest.on('onRequest', ({ request }) =\u003e /* do some parses on your thing for metrics or log it idk */);\n    this.rest.on('onResponse', ({ request, response }) =\u003e /* do some parses on your thing for metrics or log it idk */);\n    this.rest.on('onTooManyRequest', ({ request, response }) =\u003e /* do some probably, warning logs here? since this is an actual 429 and can get you banned for an hour */);\n    return super.login('token');\n  }\n}\n```\n\u003e WARNING: DO NOT CHANGE OR RUN ANY FUNCTION FROM THE PARAMETERS. It's designed to be used as read-only values\n\n\u003e Based from my old handling from `@Kashima`, Made with ❤ by @Sāya#0113\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipgirlproject%2Fazuma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshipgirlproject%2Fazuma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipgirlproject%2Fazuma/lists"}