Add Phase 2: integrations, admin, and remaining commands

New commands: agent, trivia (with 30s timer reveal), ask (Ollama LLM
with cooldown), minecraft (RCON whitelist), health (admin-only metrics).
Adds metrics tracking, per-user cooldowns, and admin permission checks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 20:52:57 -05:00
parent 50de731a82
commit 5723ac3581
5 changed files with 325 additions and 2 deletions

View File

@@ -16,10 +16,21 @@ BOT_PREFIX = os.getenv("BOT_PREFIX", "!")
ADMIN_USERS = [u.strip() for u in os.getenv("ADMIN_USERS", "").split(",") if u.strip()]
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO")
# Integrations
OLLAMA_URL = os.getenv("OLLAMA_URL", "http://10.10.10.157:11434")
OLLAMA_MODEL = os.getenv("OLLAMA_MODEL", "lotusllm")
MINECRAFT_RCON_HOST = os.getenv("MINECRAFT_RCON_HOST", "10.10.10.67")
MINECRAFT_RCON_PORT = int(os.getenv("MINECRAFT_RCON_PORT", "25575"))
MINECRAFT_RCON_PASSWORD = os.getenv("MINECRAFT_RCON_PASSWORD", "")
# Constants
MAX_INPUT_LENGTH = 500
MAX_DICE_SIDES = 100
MAX_DICE_COUNT = 20
COOLDOWN_SECONDS = int(os.getenv("COOLDOWN_SECONDS", "120"))
RCON_TIMEOUT = 5.0
MIN_USERNAME_LENGTH = 3
MAX_USERNAME_LENGTH = 16
class ConfigValidator: