Files
TheOnlyMace 4f57cccea5
Some checks failed
CI / Bot (Python) (push) Successful in 12s
CI / Dashboard (Next.js) (push) Failing after 9s
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.
2026-07-21 23:09:35 +02:00

65 lines
3.2 KiB
Plaintext

TOKEN=TOKEN_HERE
brand_name='Axiom'
NEXT_PUBLIC_BRAND_NAME='Axiom'
# ── Multiple instances (optional) ─────────────────────────────────────────────
# Run several bot processes on one host — each needs its own .env / TOKEN / API_PORT.
# BOT_INSTANCE_ID isolates all SQLite + jsondb files under bot/db/<id>/ (and jsondb subfolder).
# Leave unset for normal single-bot operation (paths stay bot/db/*.db and bot/jsondb/*.json).
# 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
# ── Optional: debug REPL for owners (disabled by default) ─────────────────────
JISHAKU_ENABLED=false
# ── Optional: Discord log / stats channels (leave empty to disable) ───────────
# LOG_CHANNEL_ID=
# SERVER_COUNT_CHANNEL_ID=
# USER_COUNT_CHANNEL_ID=
# ── Lavalink ──────────────────────────────────────────────────────────────────
LAVALINK_HOST="lavalink.jirayu.net"
LAVALINK_PASSWORD="youshallnotpass"
LAVALINK_SECURE="false"
LAVALINK_PORT="13592"
SLASH_SYNC_MODE=global
# global = one set worldwide (default, no duplicates)
# guild = instant only in connected servers (set SLASH_GUILD_IDS or rely on all guilds)
# SLASH_GUILD_IDS=
# Clears old per-server copies that caused duplicate /commands in Discord
SLASH_CLEAR_GUILD_COMMANDS=true
# ── API / Dashboard Backend ───────────────────────────────────────────────────
API_ENABLED="false"
API_HOST="127.0.0.1"
API_PORT="8000"
DASHBOARD_API_KEY="generate_a_long_random_secret_here"
# Discord user IDs allowed to use /api/v1/admin (comma-separated; falls back to OWNER_IDS)
DASHBOARD_ADMIN_IDS=YOUR_DISCORD_USER_ID_HERE
CORS_ORIGINS=""
# ── Webhooks (leave empty or unset to disable command logging) ────────────────
# CMD_WEBHOOK_URL must be a full Discord webhook URL to enable logging.
# CMD_WEBHOOK_URL=
# ── Cloudflare Tunnel (disabled by default) ───────────────────────────────────
TUNNEL_ENABLED="false"
TUNNEL_ALLOW_BINARY_DOWNLOAD="false"
# CF_TUNNEL_TOKEN=
# CF_TUNNEL_URL=