Receives VirtFusion webhook events and posts them as embeds to a Discord channel.
npm install
cp .env.example .envEdit .env:
DISCORD_WEBHOOK_URL— a Discord channel webhook URL (Channel Settings → Integrations → Webhooks).WEBHOOK_PATH— the path VirtFusion will POST to (default/webhooks/virtfusion).PORT— port to listen on (default3000).
Run:
npm startIn VirtFusion, add a webhook pointing to http://<this-host>:<PORT><WEBHOOK_PATH>.
- Unrecognized event types fall back to a generic embed built from common fields (
event,controlName, server/user data,errors). - Special-cased events with nicer titles:
server.boot,server.build,server.suspend,server.delete,user.create. Add more insrc/formatEvent.js. - The endpoint currently accepts any POST with an
eventfield — there is no shared-secret or signature check, so anyone who discovers the URL could send fake events. Add a shared-secret header check insrc/server.jsif the endpoint will be internet-reachable.