Add Discord sharding support and related configurations
Enhance the bot's architecture by introducing sharding capabilities, allowing for better scalability and performance. Update environment files to include sharding options, and modify the bot's core logic to handle shard connections and latencies. Implement shard-specific logging and API synchronization, ensuring that only the primary shard performs certain tasks. Update API schemas and routes to reflect shard information, improving the overall status reporting and monitoring of the bot's performance across multiple shards.
This commit is contained in:
@@ -9,6 +9,16 @@ NEXT_PUBLIC_BRAND_NAME='Axiom'
|
||||
# BOT_INSTANCE_ID=prod-a
|
||||
# API_PORT=8001
|
||||
|
||||
# ── Discord sharding (optional) ───────────────────────────────────────────────
|
||||
# Default (all unset): AutoShardedBot asks Discord for recommended shard count (one process).
|
||||
# Multi-process cluster: same TOKEN + shared DB volume; set SHARD_COUNT + SHARD_IDS per process.
|
||||
# API / slash sync / emoji sync only on the primary (shard 0 in SHARD_IDS, or SHARD_PRIMARY=true).
|
||||
# SHARD_COUNT=
|
||||
# SHARD_IDS=0,1
|
||||
# SHARD_PRIMARY=
|
||||
# Only enable API on the primary process:
|
||||
# API_ENABLED=true
|
||||
|
||||
# ── Owner / Staff IDs (REQUIRED — comma-separated Discord user IDs) ───────────
|
||||
# Set your own Discord user ID(s). No foreign IDs are used as fallback.
|
||||
OWNER_IDS=YOUR_DISCORD_USER_ID_HERE
|
||||
|
||||
Reference in New Issue
Block a user