Update configuration and README for improved setup and security; disable default API and emoji sync, and enhance Discord permission checks in API routes.

This commit is contained in:
TheOnlyMace
2026-07-21 16:00:52 +02:00
parent 1fdaf4dd6c
commit 127f8a032f
25 changed files with 780 additions and 434 deletions

View File

@@ -1,53 +1,43 @@
TOKEN = TOKEN_HERE
TOKEN=TOKEN_HERE
brand_name='ZyroX'
NEXT_PUBLIC_BRAND_NAME='ZyroX'
# ── Owner / Staff IDs (comma-separated Discord user IDs) ──────────────────────
# Edit this list — no code changes needed anywhere else
OWNER_IDS=870179991462236170,767979794411028491,1432771000629596225,1382744437049790495,1263404140965396555
# ── 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"
# Set to true if the node uses HTTPS/WSS (secure), false for HTTP/WS
LAVALINK_SECURE="false"
# Only needed when LAVALINK_SECURE is false (e.g. 2333)
LAVALINK_PORT="13592"
# ── Emoji Sync ────────────────────────────────────────────────────────────────
# Set to true to enable automatic application emoji sync on startup
EMOJI_SYNC="false"
# ── API / Dashboard Backend ───────────────────────────────────────────────────
# Set to true to enable the dashboard API server
API_ENABLED="false"
# Port the API server listens on
API_HOST="127.0.0.1"
API_PORT="8000"
DASHBOARD_API_KEY="ZYROX_SECURE_API_KEY_12345_CHANGE_THIS_ASAP_BY_CODEX_DEVS"
# Extra CORS-allowed origins, comma-separated (optional)
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=""
# CODEX DEVS
# ── 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=
# ── Webhooks ──────────────────────────────────────────────────────────────────
WEBHOOK_URL="https://discord.com/api/webhooks/"
CMD_WEBHOOK_URL="https://discord.com/api/webhooks/"
# ── Cloudflare Tunnel For API Server ─────────────────────────────────────────────────────────
#
# How to get CF_TUNNEL_TOKEN (browser only, no CLI):
# 1. Go to https://one.dash.cloudflare.com
# 2. Networks → Tunnels → Create a tunnel → Choose "Cloudflared"
# 3. Give it a name (e.g. zyrox-api) and save
# 4. On the "Install connector" step, copy the token from the shown command:
# cloudflared tunnel run --token <COPY_THIS_TOKEN>
# 5. Go to "Published Application Routes" tab → Add a Published Application Routes:
# Subdomain: zyrox-api Domain: yourdomain.com Service: http://localhost:8000
# 6. Paste the token below — that's it. Permanent URL, unlimited traffic.
#
TUNNEL_ENABLED="true"
CF_TUNNEL_TOKEN="xxx_xxxx"
CF_TUNNEL_URL="https://zyrox-api.yourdomain.com"
# ── Cloudflare Tunnel (disabled by default) ───────────────────────────────────
TUNNEL_ENABLED="false"
TUNNEL_ALLOW_BINARY_DOWNLOAD="false"
# CF_TUNNEL_TOKEN=
# CF_TUNNEL_URL=