refactor: replace old bot code with Matrix infra configs and scripts

- Remove obsolete Python bot (Wordle, commands, callbacks, welcome)
- Add hookshot/ — all 11 webhook transformation functions + deploy.sh
- Add cinny/ — config.json and dev-update.sh (nightly dev branch build)
- Add landing/ — matrix.lotusguild.org landing page HTML
- Add systemd/ — livekit-server, draupnir, cinny cron unit files
- Add draupnir/ — production config (access token redacted)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-18 10:36:51 -04:00
parent e6b1030b04
commit 0e275d725e
31 changed files with 1148 additions and 5087 deletions

18
hookshot/uptime-kuma.js Normal file
View File

@@ -0,0 +1,18 @@
var monitor = data.monitor || {};
var hb = data.heartbeat || {};
var name = monitor.name || monitor.url || 'Monitor';
var url = monitor.url || '';
var status = hb.status;
var emoji = status === 1 ? '🟢' : (status === 0 ? '🔴' : '🟡');
var state = status === 1 ? 'UP' : (status === 0 ? 'DOWN' : 'Unknown');
var reason = hb.msg || '';
var ping = (hb.ping !== undefined && hb.ping !== null) ? hb.ping + 'ms' : '';
var duration = hb.duration ? hb.duration + 's' : '';
if (reason === 'OK' || reason === '200 - OK' || reason === '200') reason = '';
var lines = [emoji + ' ' + name + ' is ' + state];
var htmlParts = ['<b>' + emoji + ' ' + name + ' is ' + state + '</b>'];
if (url) { lines.push(url); htmlParts.push('<a href="' + url + '">' + url + '</a>'); }
if (reason) { lines.push('Reason: ' + reason); htmlParts.push('Reason: ' + reason); }
if (ping && status === 1) { lines.push('Ping: ' + ping); htmlParts.push('Ping: ' + ping); }
if (duration && status === 0) { lines.push('Down for: ' + duration); htmlParts.push('Down for: ' + duration); }
result = { version: 'v2', plain: lines.join('\n'), html: htmlParts.join('<br>'), msgtype: 'm.notice' };