{"repo":"GalaxyBotTeam/galactic.ts","free":true,"listed":false,"github":"https://github.com/GalaxyBotTeam/galactic.ts","clone":"git clone https://github.com/GalaxyBotTeam/galactic.ts.git","description":"Next level discord sharding system with cross machine hosting out of the box","language":"TypeScript","stars":30,"topics":["discord","discord-bot","discord-js","horizontal-scaling","performance","scaling","sharding","hybrid-sharding"],"license":"MIT","category":"chat-messaging","readme_excerpt":"galactic is a powerful scaling library for Discord bots, built to make distributed shard and cluster management simple, efficient, and highly flexible. Overview galactic allows you to run multiple Discord shards within a single process and scale your bot seamlessly across multiple machines or containers. It’s designed to integrate smoothly with discord.js, enabling developers to focus on building features instead of managing complex scaling setups. Key Features - Run multiple Discord shards in one process - Automate cluster distribution across multiple machines or Docker containers - Utilize the galactic Bridge to synchronize shards and clusters - Seamless integration with discord.js - Optimized for both small and large-scale bot deployments - Easy configuration and setup - Open-source and actively maintained - Reclustering without downtime - Graceful shutdown with async cleanup callbacks Installation Quick Start Example Standalone Setup (Single Machine) Bot File Setup Graceful Shutdown StandaloneInstance exposes a shutdown() method that gracefully stops all clusters before the process exits. It sends each cluster a destruct signal, awaits its cleanup callback, and only resolves once every child process has fully terminated. To run custom cleanup logic per cluster (e.g. destroying a Discord client), set onSelfDestruct in your bot file. Async callbacks are fully awaited before the cluster exits: Distributed Setup To scale your bot across multiple servers or containers, galacti","default_branch":null,"files":null,"tree":[],"storefront":"/r/GalaxyBotTeam","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/GalaxyBotTeam/galactic.ts/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}