panel v0.9.2 — open-source game server manager
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
-- Chat-bot configuration: per-instance trigger registry
|
||||
CREATE TABLE empyrion_chatbot_rules (
|
||||
id TEXT PRIMARY KEY,
|
||||
instance_id TEXT, -- NULL = applies to all empyrion instances
|
||||
command TEXT NOT NULL, -- player types "!<command>" in chat
|
||||
description TEXT NOT NULL DEFAULT '',
|
||||
response TEXT NOT NULL, -- supports {playerName} {playerId} {factionId} {playfield} placeholders
|
||||
channel TEXT NOT NULL DEFAULT 'whisper', -- whisper | global | faction
|
||||
enabled BOOLEAN NOT NULL DEFAULT true,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
UNIQUE (instance_id, command)
|
||||
);
|
||||
|
||||
-- Seed three default rules (global, applies to all instances)
|
||||
INSERT INTO empyrion_chatbot_rules (id, instance_id, command, description, response, channel, enabled) VALUES
|
||||
('cb_help', NULL, 'help', 'List available commands', 'Bot commands: !help · !coords · !time', 'whisper', true),
|
||||
('cb_coords', NULL, 'coords', 'Tell player their coords', 'Your position: {playfield} ({x},{y},{z})', 'whisper', true),
|
||||
('cb_time', NULL, 'time', 'Server clock', 'Server time: {now}', 'whisper', true);
|
||||
Reference in New Issue
Block a user